-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
37 lines (34 loc) · 1.31 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: '3'
services:
# Reverse proxy
traefik:
image: traefik:${TRAEFIK_VERSION} # for use in production always use an specific version
env_file: .env
command: --docker -- api --logLevel=info --docker.domain=${DOMAIN} # domain to redirect the request
ports:
- ${HTTP_PORT}:80 # default port for reverse proxy
- ${HTTPS_PORT}:443 # default port for reverse proxy
networks:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${TRAEFIK_TOML_FILE_ROUTE}:/traefik.toml # master file to save all the config for traefik
- ${TRAEFIK_ACME_FILE_ROUTE}:/acme.json # autogenerate reading the config file (traefik.toml)
- ${TRAEFIK_TMP_ROUTE}:/tmp
labels:
- "traefik.frontend.rule=Host:monitor.${DOMAIN}" # domain to access the dashboard odd traefik
- "traefik.port=8080" # default port to access the dashboard for traefik
container_name: traefik
restart: always
# Container one
whoami01:
image: containous/whoami
env_file: .env
labels:
- "traefik.frontend.rule=Host:whoami01.${DOMAIN}"
networks:
- proxy
# Networks
networks:
proxy: # new docker network to work
external: true