fix: Deploy nginx using a stack file

This commit is contained in:
2025-08-02 22:23:19 +02:00
parent f608a2ef4e
commit ee41c1ce64
2 changed files with 29 additions and 1 deletions
-1
View File
@@ -127,7 +127,6 @@ jobs:
key: ${{ secrets.DEPLOY_KEY }}
script: |
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.env }}
docker service update --image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.env }} nginx-proxy
for f in ~/stack-config/*.yaml; do
NAME=$(basename "$f" .yaml)
docker stack deploy -c "$f" "$NAME"
+29
View File
@@ -0,0 +1,29 @@
services:
nginx-proxy:
image: ghcr.io/2martens/docker-nginx:test
deploy:
mode: global
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
volumes:
- type: bind
source: /etc/letsencrypt
target: /etc/letsencrypt
read_only: true
- type: bind
source: /var/www/certbot
target: /var/www/certbot
read_only: true
networks:
- internal_net
networks:
internal_net:
external: true