Skip to content

Commit 260daab

Browse files
committed
Merge branch '2.0.0'
2 parents a3c2f7e + 4be07d3 commit 260daab

File tree

240 files changed

+30916
-63121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+30916
-63121
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ node_modules
104104
server/client
105105
server/secret
106106
server/server/datasources.test*
107+
server/server/datasources.development*
107108

108109
dist/tower-*
109110

.idea/jsLinters/eslint.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/prettier.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/tower.iml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 221 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Copyright.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Copyright RPSoft 2019,2020. All Rights Reserved.
2+
This file is part of RPSoft Tower.
3+
4+
Tower is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation; either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
Tower is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with Tower. If not, see http:www.gnu.org/licenses/gpl-3.0.html.

dist/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"nonSafe": false,
77
"fullEncryption": false,
88
"tokenHeaders": [],
9+
"auditTTL": 30,
910
"#privateKey": "./certs/privatekey.pem",
1011
"#certificate": "./certs/certificate.pem"
1112
}

docker/Dockerfile

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
FROM ubuntu:20.04
22

3-
ARG VERSION=1.17.0
3+
ARG VERSION=2.0.0
44

55
LABEL TOWER_VERSION=${VERSION}
66

77
ENV NODE_ENV production
8+
ENV NVM_DIR /home/tower/.nvm
89

9-
RUN apt update && apt install -y wget unzip
10+
RUN apt update && apt install -y wget unzip git curl
1011

11-
RUN mkdir -p /apps/tower
12+
RUN mkdir -p /home/tower
1213

13-
WORKDIR /apps/tower
14+
WORKDIR /home/tower
1415

1516
RUN groupadd -g 2001 tower \
1617
&& useradd -r -u 2001 -g tower tower
@@ -19,11 +20,29 @@ RUN chown -R tower:tower .
1920

2021
USER tower
2122

22-
RUN wget -q https://github.com/RPSoftCompany/tower/releases/download/${VERSION}/tower-${VERSION}.zip
23-
RUN unzip tower-${VERSION}.zip
24-
RUN mv tower/* .
23+
RUN git clone https://github.com/RPSoftCompany/tower.git
2524

26-
RUN chmod 777 ./tower-linux
25+
RUN ( git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR" && \
26+
cd "$NVM_DIR" && \
27+
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)` \
28+
) && \. "$NVM_DIR/nvm.sh"
29+
30+
WORKDIR /home/tower/tower
31+
32+
RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install node && npm install
33+
34+
WORKDIR /home/tower/tower/server
35+
36+
RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install && npm install
37+
RUN mkdir -p client/ui
38+
39+
WORKDIR /home/tower/tower/ui
40+
41+
RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install && export NODE_ENV=development && npm install
42+
RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm use && npm i -g @quasar/cli && npm run build
43+
RUN cp -r ./dist/spa/* ../server/client/ui/
44+
45+
WORKDIR /home/tower/tower/server
2746

2847
COPY config.json .
2948
COPY database-config.json_template .

docker/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"nonSafe": $NON_SAFE,
77
"fullEncryption": $FULL_ENCRYPTION,
88
"tokenHeaders": $TOKEN_HEADERS,
9+
"auditTTL": $AUDIT_TTL,
910
"#privateKey": "./certs/privatekey.pem",
1011
"#certificate": "./certs/certificate.pem"
1112
}

docker/dockerStart.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
#!/bin/bash
22

3+
#
4+
# Copyright RPSoft 2019,2023. All Rights Reserved.
5+
# This file is part of RPSoft Tower.
6+
#
7+
# Tower is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation; either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# Tower is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with Tower. If not, see http:www.gnu.org/licenses/gpl-3.0.html.
19+
#
20+
321
# =============================
422
# secret
523
# =============================
@@ -46,6 +64,12 @@ then
4664
__NON_SAFE="false"
4765
fi
4866

67+
__AUDIT_TTL=${AUDIT_TTL}
68+
if [ -z "${__AUDIT_TTL}" ]
69+
then
70+
__AUDIT_TTL="30"
71+
fi
72+
4973
__FULL_ENCRYPTION=${FULL_ENCRYPTION}
5074
if [ -z "${__FULL_ENCRYPTION}" ]
5175
then
@@ -78,4 +102,4 @@ fi
78102

79103
awk -v database="${__DATABASE}" '{sub(/\$DATABASE/, database)}1' database-config.json_template > database-config.json
80104

81-
exec ./tower-linux
105+
exec node .

0 commit comments

Comments
 (0)