File tree Expand file tree Collapse file tree 4 files changed +23
-5
lines changed
Expand file tree Collapse file tree 4 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,6 @@ jobs:
153153
154154 - name : Manifest Docker Image
155155 run : |
156- docker manifest create ${{ steps.set-tag.outputs.TAGS }} \
156+ docker buildx imagetools create -t ${{ steps.set-tag.outputs.TAGS }} \
157157 ${{ steps.set-tag.outputs.AMD_TAGS }} \
158- ${{ steps.set-tag.outputs.ARM_TAGS }}
159- docker manifest push ${{ steps.set-tag.outputs.TAGS }}
158+ ${{ steps.set-tag.outputs.ARM_TAGS }}
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public:
4141 data :
4242 DB_PASSWORD : " password"
4343 CERT_PASS : " "
44+ DOMAIN : " "
4445
4546datasetVolume : &datasetVolume
4647 name : dataset-volume
@@ -177,6 +178,11 @@ frontend:
177178 secretKeyRef :
178179 name : datamate-conf
179180 key : CERT_PASS
181+ - name : DOMAIN
182+ valueFrom :
183+ secretKeyRef :
184+ name : datamate-conf
185+ key : DOMAIN
180186 volumes :
181187 - *logVolume
182188 - name : cert-volume
Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ FROM nginx:1.29 AS runner
1212RUN --mount=type=cache,target=/var/cache/apt \
1313 --mount=type=cache,target=/var/lib/apt \
1414 apt update \
15- && apt install -y dos2unix
15+ && apt install -y dos2unix python3 python3-dev python3-venv libaugeas-dev gcc \
16+ && python3 -m venv /opt/certbot/ \
17+ && /opt/certbot/bin/pip install --upgrade pip \
18+ && /opt/certbot/bin/pip install certbot certbot-nginx \
19+ && ln -s /opt/certbot/bin/certbot /usr/local/bin/certbot
1620
1721COPY --from=builder /app/dist /opt/frontend/statics
1822COPY scripts/images/frontend/routes.inc /opt/frontend/routes.inc
Original file line number Diff line number Diff line change @@ -21,7 +21,16 @@ if [ -f "/etc/nginx/cert/server.pem" ]; then
2121else
2222 cp /opt/frontend/http_backend.conf /etc/nginx/conf.d/default.conf
2323 cp /opt/frontend/routes.inc /etc/nginx/conf.d/routes.inc
24- echo " Switching to HTTP config"
24+
25+ if [ -n " $DOMAIN " ]; then
26+ cron
27+ certbot --nginx " -d ${DOMAIN// ,/ -d } "
28+ echo " Switching to HTTPS config, Domain: $DOMAIN "
29+ echo " 0 0 1 * * root /usr/local/bin/certbot renew --quiet" | tee /etc/cron.d/certbot-renew
30+ chmod 0644 /etc/cron.d/certbot-renew
31+ else
32+ echo " Switching to HTTP config"
33+ fi
2534fi
2635
2736exec nginx -g " daemon off;"
You can’t perform that action at this time.
0 commit comments