File tree Expand file tree Collapse file tree 3 files changed +16
-15
lines changed Expand file tree Collapse file tree 3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -135,9 +135,10 @@ RUN yarn build
135135FROM nginx:1.23.4 as lowcoder-ce-frontend
136136LABEL maintainer="lowcoder"
137137
138- # Change default nginx user into lowcoder user
138+ # Change default nginx user into lowcoder user and remove default nginx config
139139RUN 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
141142
142143# Copy lowcoder client data
143144COPY --chown=lowcoder:lowcoder --from=build-client /lowcoder-client/packages/lowcoder/build/ /lowcoder/client
Original file line number Diff line number Diff line change 6666# Enable frontend if configured to run
6767if [ " ${FRONTEND_ENABLED:= true} " = " true" ]; then
6868 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 ;
8269fi ;
8370
8471# Handle CMD command
Original file line number Diff line number Diff line change 22
33set -e
44
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+
518sed -i " s@__LOWCODER_API_SERVICE_URL__@${LOWCODER_API_SERVICE_URL:= http:// localhost: 8080} @" /etc/nginx/nginx.conf
619sed -i " s@__LOWCODER_NODE_SERVICE_URL__@${LOWCODER_NODE_SERVICE_URL:= http:// localhost: 6060} @" /etc/nginx/nginx.conf
720
You can’t perform that action at this time.
0 commit comments