adds docker swarm stack file [CI SKIP]

This commit is contained in:
OCram85 2022-01-13 09:13:17 +01:00 committed by GitHub
parent c4af3591be
commit 76e3e9b6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

62
docker-compose.yml Normal file
View File

@ -0,0 +1,62 @@
version: "3.8"
services:
next:
image: ocram85/blog:next
restart: unless-stopped
networks:
- blog
- traefik-public
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 15s
order: start-first
labels:
- "traefik.enable=true"
#- "traefik.docker.lbswarm=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.next.rule=Host(`next.ocram85.com`)"
- "traefik.http.routers.next.tls=true"
- "traefik.http.services.next-srv.loadbalancer.server.port=80"
# optional health checks
- "traefik.http.services.next-srv.loadbalancer.healthCheck.path=/"
- "traefik.http.services.next-srv.loadbalancer.healthCheck.interval=10s"
- "traefik.http.services.next-srv.loadbalancer.healthCheck.timeout=3s"
- "traefik.http.services.next-srv.loadbalancer.healthCheck.port=80"
- "traefik.http.services.next-srv.loadbalancer.healthCheck.scheme=http"
blog:
image: ocram85/blog:latest
restart: unless-stopped
networks:
- blog
- traefik-public
deploy:
replicas: 2
update_config:
parallelism: 1
delay: 15s
order: start-first
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
#- "traefik.docker.lbswarm=true"
- "traefik.http.routers.blog.rule=Host(`ocram85.com`)"
- "traefik.http.routers.blog.tls=true"
- "traefik.http.services.blog-srv.loadbalancer.server.port=80"
# optional health checks
- "traefik.http.services.blog-srv.loadbalancer.healthCheck.path=/"
- "traefik.http.services.blog-srv.loadbalancer.healthCheck.interval=10s"
- "traefik.http.services.blog-srv.loadbalancer.healthCheck.timeout=3s"
- "traefik.http.services.blog-srv.loadbalancer.healthCheck.port=80"
- "traefik.http.services.blog-srv.loadbalancer.healthCheck.scheme=http"
networks:
traefik-public:
external: true
blog:
name: blog
driver: overlay