Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
sinacek committed Sep 17, 2020
1 parent 2ed8048 commit ea9be80
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docker-swarm/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ services:
app:
image: skaut/snem-volby:latest
volumes:
- sessions:/var/www/html/temp/sessions
- /srv/app-sessions:/var/www/html/temp/sessions
- /srv/app-log:/var/www/html/log
- /srv/app-temp:/var/www/html/temp
networks:
- traefik
configs:
Expand All @@ -19,7 +21,7 @@ services:
cpus: "0.50"
memory: "512M"
labels:
traefik.frontend.rule: 'Host:zmenastanov.skaut.cz,www.zmenastanov.skaut.cz'
traefik.frontend.rule: 'Host:volby.skaut.cz,www.volby.skaut.cz'
traefik.port: '80'
traefik.docker.network: traefik
swarmpit.service.deployment.autoredeploy: 'true'
Expand All @@ -35,6 +37,3 @@ networks:
configs:
dev-config.local.neon-v2:
external: true

volumes:
sessions:
51 changes: 51 additions & 0 deletions docker-swarm/traefik.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: '3.4'
services:
traefik:
image: traefik:1.7.24
command: |
--api \
--web \
--logLevel=warn \
--entryPoints="Name:http Address::80 Redirect.EntryPoint:https" \
--entryPoints="Name:https Address::443 TLS" \
--defaultentrypoints="http,https" \
--acme.storage=/acme/acme.json \
--acme=true \
--acme.entrypoint=https \
--acme.httpchallenge \
--acme.httpchallenge.entrypoint=http \
--acme.domains="volby.skaut.cz,www.volby.skaut.cz" \
--acme.email="[email protected]" \
--docker \
--docker.watch=true \
--docker.swarmmode
ports:
- 80:80
- 443:443
- 9999:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- traefik_acme:/acme
networks:
- traefik
deploy:
placement:
constraints:
- node.role==manager
update_config:
order: start-first
resources:
reservations:
cpus: "0.05"
memory: "10M"
limits:
cpus: "0.5"
memory: "200M"

volumes:
traefik_acme:

networks:
traefik:
external: true

0 comments on commit ea9be80

Please sign in to comment.