root Apostolos
6 years ago
2 changed files with 52 additions and 0 deletions
@ -0,0 +1,51 @@ |
|||||
|
version: "3.3" |
||||
|
services: |
||||
|
traefik: |
||||
|
image: traefik |
||||
|
command: --web \ |
||||
|
--docker \ |
||||
|
--docker.swarmMode \ |
||||
|
--docker.domain=swarm \ |
||||
|
--docker.watch \ |
||||
|
--logLevel=DEBUG \ |
||||
|
--api |
||||
|
networks: |
||||
|
- traefik-net |
||||
|
ports: |
||||
|
- "80:80" |
||||
|
- "8080:8080" |
||||
|
volumes: |
||||
|
- /var/run/docker.sock:/var/run/docker.sock |
||||
|
- /dev/null:/traefik.toml |
||||
|
deploy: |
||||
|
placement: |
||||
|
constraints: |
||||
|
- node.id == ${REGISTERid} |
||||
|
|
||||
|
docs: |
||||
|
image: registry.vlabs.uniwa.gr:5080/vlab-apache2 |
||||
|
networks: |
||||
|
- traefik-net |
||||
|
deploy: |
||||
|
replicas: 1 |
||||
|
placement: |
||||
|
constraints: |
||||
|
- node.id == ${REGISTERid} |
||||
|
labels: |
||||
|
- "traefik.enable=true" |
||||
|
- "traefik.port=80" |
||||
|
- "traefik.docker.network=mystack_traefik-net" |
||||
|
- "traefik.frontend.rule=Host:docs.vlabs.uniwa.gr" |
||||
|
- "traefik.backend=docsswarm" |
||||
|
volumes: |
||||
|
- "/var/lab/html/files:/var/www/html/files" |
||||
|
- "/mnt/web/docs_vlabs:/var/www/html" |
||||
|
- "/mnt/web/docs_vlabs_conf/httpd.conf:/etc/apache2/sites-enabled/000-default.conf" |
||||
|
|
||||
|
|
||||
|
networks: |
||||
|
traefik-net: |
||||
|
|
||||
|
volumes: |
||||
|
portainerdata: |
||||
|
|
@ -0,0 +1 @@ |
|||||
|
env REGISTERid=st6ebl5y2kjvgjthq88v6r2fs docker stack deploy -c traefik-stack.yml main |
Loading…
Reference in new issue