File tree 3 files changed +16
-15
lines changed
3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -135,9 +135,10 @@ RUN yarn build
135
135
FROM nginx:1.23.4 as lowcoder-ce-frontend
136
136
LABEL maintainer="lowcoder"
137
137
138
- # Change default nginx user into lowcoder user
138
+ # Change default nginx user into lowcoder user and remove default nginx config
139
139
RUN usermod --login lowcoder --uid 9001 nginx \
140
- && groupmod --new-name lowcoder --gid 9001 nginx
140
+ && groupmod --new-name lowcoder --gid 9001 nginx \
141
+ && rm -f /etc/nginx/nginx.conf
141
142
142
143
# Copy lowcoder client data
143
144
COPY --chown=lowcoder:lowcoder --from=build-client /lowcoder-client/packages/lowcoder/build/ /lowcoder/client
Original file line number Diff line number Diff line change 66
66
# Enable frontend if configured to run
67
67
if [ " ${FRONTEND_ENABLED:= true} " = " true" ]; then
68
68
ln ${SUPERVISOR_AVAILABLE} /20-frontend.conf ${SUPERVISOR_ENABLED} /20-frontend.conf
69
-
70
- unlink /etc/nginx/nginx.conf 2> /dev/null
71
- if [ -e " ${CERT} /fullchain.pem" ] && [ -e " ${CERT} /privkey.pem" ]; then
72
- echo " Certificates found, starting with HTTPS."
73
- ln -s /etc/nginx/nginx-https.conf /etc/nginx/nginx.conf
74
- if [ ! -e " ${CERT} /dhparam.pem" ]; then
75
- echo " Diffle-Helmann parameters file not found, generating in now... (this can take some time)"
76
- openssl dhparam -out " ${CERT} /dhparam.pem" 4096
77
- fi ;
78
- else
79
- echo " Certificates not found, starting with HTTP."
80
- ln -s /etc/nginx/nginx-http.conf /etc/nginx/nginx.conf
81
- fi ;
82
69
fi ;
83
70
84
71
# Handle CMD command
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
+ echo " Creating nginx config..."
6
+ if [ -e " ${CERT} /fullchain.pem" ] && [ -e " ${CERT} /privkey.pem" ]; then
7
+ echo " Certificates found, configuring with HTTPS."
8
+ ln -s /etc/nginx/nginx-https.conf /etc/nginx/nginx.conf
9
+ if [ ! -e " ${CERT} /dhparam.pem" ]; then
10
+ echo " Diffle-Helmann parameters file not found, generating in now... (this can take some time)"
11
+ openssl dhparam -out " ${CERT} /dhparam.pem" 4096
12
+ fi ;
13
+ else
14
+ echo " Certificates not found, configuring with HTTP."
15
+ ln -s /etc/nginx/nginx-http.conf /etc/nginx/nginx.conf
16
+ fi ;
17
+
5
18
sed -i " s@__LOWCODER_API_SERVICE_URL__@${LOWCODER_API_SERVICE_URL:= http:// localhost: 8080} @" /etc/nginx/nginx.conf
6
19
sed -i " s@__LOWCODER_NODE_SERVICE_URL__@${LOWCODER_NODE_SERVICE_URL:= http:// localhost: 6060} @" /etc/nginx/nginx.conf
7
20
You can’t perform that action at this time.
0 commit comments