migrate
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
services:
|
||||
<< service_name >>:
|
||||
image: docker.io/library/nginx:1.30.0-alpine
|
||||
<%- if traefik_enabled %>
|
||||
networks:
|
||||
<< traefik_network >>:
|
||||
<%- endif %>
|
||||
<%- if not traefik_enabled %>
|
||||
ports:
|
||||
- target: 80
|
||||
published: << ports_http >>
|
||||
protocol: tcp
|
||||
mode: host
|
||||
- target: 443
|
||||
published: << ports_https >>
|
||||
protocol: tcp
|
||||
mode: host
|
||||
<%- endif %>
|
||||
# volumes:
|
||||
# - ./config/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
# - ./data:/usr/share/nginx/html:ro
|
||||
deploy:
|
||||
mode: << swarm_placement_mode >>
|
||||
<%- if swarm_placement_mode == 'replicated' %>
|
||||
replicas: << swarm_replicas >>
|
||||
<%- endif %>
|
||||
<%- if swarm_placement_host %>
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == << swarm_placement_host >>
|
||||
<%- endif %>
|
||||
<%- if traefik_enabled %>
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=<< traefik_network >>
|
||||
- traefik.http.services.<< service_name >>-web.loadbalancer.server.port=80
|
||||
- traefik.http.routers.<< service_name >>-web-http.rule=Host(`<< traefik_host >>.<< traefik_domain >>`)
|
||||
- traefik.http.routers.<< service_name >>-web-http.entrypoints=<< traefik_entrypoint >>
|
||||
- traefik.http.routers.<< service_name >>-web-http.service=<< service_name >>-web
|
||||
<%- if traefik_tls_enabled %>
|
||||
- traefik.http.routers.<< service_name >>-web-https.rule=Host(`<< traefik_host >>.<< traefik_domain >>`)
|
||||
- traefik.http.routers.<< service_name >>-web-https.entrypoints=<< traefik_tls_entrypoint >>
|
||||
- traefik.http.routers.<< service_name >>-web-https.tls=true
|
||||
- traefik.http.routers.<< service_name >>-web-https.tls.certresolver=<< traefik_tls_certresolver >>
|
||||
- traefik.http.routers.<< service_name >>-web-https.service=<< service_name >>-web
|
||||
<%- endif %>
|
||||
<%- endif %>
|
||||
|
||||
<%- if traefik_enabled %>
|
||||
networks:
|
||||
<< traefik_network >>:
|
||||
external: true
|
||||
<%- endif %>
|
||||
Reference in New Issue
Block a user