docker-swarm-review

This commit is contained in:
2026-05-13 15:23:46 +08:00
parent da02c6a994
commit 5074e9cc42
128 changed files with 13062 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
# crm1环境下 部署nginx
env $(cat ./env_crm1 | xargs) envsubst < ./docker-compose.yml | docker stack deploy --compose-file - crm1_nginx

View File

@@ -0,0 +1,26 @@
version: '3.8'
networks:
default:
name: ${NAMESPACE}
external: true
services:
server:
image: 'docker.io/bitnami/nginx:1.24'
ports:
- '${NODE_PORT}:8080'
environment:
- TZ=Asia/Shanghai
configs:
- source: custome_config
target: /opt/bitnami/nginx/conf/server_blocks/crm1.conf
deploy:
update_config:
order: start-first
placement:
constraints:
- node.labels.${NAMESPACE}_nginx==1
configs:
custome_config:
external: true
name: ${CUSTOME_CONFIG}

View File

@@ -0,0 +1,3 @@
NAMESPACE=crm1
NODE_PORT=8080
CUSTOME_CONFIG=crm1_nginx_config