94 lines
2.5 KiB
YAML
94 lines
2.5 KiB
YAML
version: '3.8'
|
|
|
|
networks:
|
|
default:
|
|
name: ${NAMESPACE}
|
|
external: true
|
|
services:
|
|
server1:
|
|
image: 'docker.io/bitnami/nginx:1.24'
|
|
ports:
|
|
- mode: host
|
|
protocol: tcp
|
|
published: 8180
|
|
target: 8080
|
|
- mode: host
|
|
protocol: tcp
|
|
published: 8143
|
|
target: 8443
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
volumes:
|
|
- /opt/logs/nginx/:/opt/bitnami/nginx/logs/
|
|
configs:
|
|
- source: nginx_conf
|
|
target: /opt/bitnami/nginx/conf/nginx.conf
|
|
- source: nginx_ssl_sinoassist_config
|
|
target: /opt/bitnami/nginx/conf/ssl.sinoassist.conf
|
|
- source: ssl_sinoassist_key
|
|
target: /opt/bitnami/nginx/conf/server_blocks/sinoassist.com.key
|
|
- source: ssl_sinoassist_pem
|
|
target: /opt/bitnami/nginx/conf/server_blocks/sinoassist.com.pem
|
|
- source: nginx_prod_config
|
|
target: /opt/bitnami/nginx/conf/server_blocks/prod.conf
|
|
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
update_config:
|
|
order: start-first
|
|
placement:
|
|
constraints:
|
|
- node.hostname==ZD-CRM1
|
|
server2:
|
|
image: 'docker.io/bitnami/nginx:1.24'
|
|
ports:
|
|
- mode: host
|
|
protocol: tcp
|
|
published: 8280
|
|
target: 8080
|
|
- mode: host
|
|
protocol: tcp
|
|
published: 8243
|
|
target: 8443
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
volumes:
|
|
- /opt/logs/nginx/:/opt/bitnami/nginx/logs/
|
|
configs:
|
|
- source: nginx_conf
|
|
target: /opt/bitnami/nginx/conf/nginx.conf
|
|
- source: nginx_ssl_sinoassist_config
|
|
target: /opt/bitnami/nginx/conf/ssl.sinoassist.conf
|
|
- source: ssl_sinoassist_key
|
|
target: /opt/bitnami/nginx/conf/server_blocks/sinoassist.com.key
|
|
- source: ssl_sinoassist_pem
|
|
target: /opt/bitnami/nginx/conf/server_blocks/sinoassist.com.pem
|
|
- source: nginx_prod_config
|
|
target: /opt/bitnami/nginx/conf/server_blocks/prod.conf
|
|
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
update_config:
|
|
order: start-first
|
|
placement:
|
|
constraints:
|
|
- node.hostname==ZD-CRM2
|
|
configs:
|
|
nginx_conf:
|
|
external: true
|
|
name: nginx_conf_v1
|
|
nginx_ssl_sinoassist_config:
|
|
external: true
|
|
name: nginx_ssl_sinoassist_conf_v1
|
|
nginx_prod_config:
|
|
external: true
|
|
name: nginx_prod_config_v2
|
|
ssl_sinoassist_key:
|
|
external: true
|
|
name: ssl_sinoassist_key_2024
|
|
ssl_sinoassist_pem:
|
|
external: true
|
|
name: ssl_sinoassist_pem_2024
|