Refactor swarm/services.yml to update networks and add overlay driver for 'net' network

This commit is contained in:
2024-06-02 16:48:22 +08:00
parent 69059e51df
commit 7ed3d9ad64
+5 -2
View File
@@ -14,9 +14,8 @@ services:
SECURITY__BACKEND_CORS_ORIGINS: ${SECURITY__BACKEND_CORS_ORIGINS} SECURITY__BACKEND_CORS_ORIGINS: ${SECURITY__BACKEND_CORS_ORIGINS}
SECURITY__ALLOWED_HOSTS: ${SECURITY__ALLOWED_HOSTS} SECURITY__ALLOWED_HOSTS: ${SECURITY__ALLOWED_HOSTS}
DOMAIN: ${DOMAIN} DOMAIN: ${DOMAIN}
ports:
- "8000:8000"
networks: networks:
- net
- traefik-public - traefik-public
deploy: deploy:
labels: labels:
@@ -49,6 +48,7 @@ services:
timeout: 10s timeout: 10s
retries: 10 retries: 10
networks: networks:
- net
- traefik-public - traefik-public
deploy: deploy:
placement: placement:
@@ -137,5 +137,8 @@ services:
volumes: volumes:
postgres_data: {} postgres_data: {}
networks: networks:
net:
driver: overlay
attachable: true
traefik-public: traefik-public:
external: true external: true