-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·38 lines (35 loc) · 984 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·38 lines (35 loc) · 984 Bytes
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
38
version: "3"
services:
db:
image: postgres:alpine
environment:
- POSTGRES_DB=beverage
- POSTGRES_USER=maria
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./db/sql:/docker-entrypoint-initdb.d
py-srv:
build: py-srv
command: python app.py
ports:
- "5000"
labels:
- traefik.enable=true
- traefik.http.routers.myapp.tls=true
- traefik.http.routers.myapp.rule=Host("myapi.docker.localhost")
traefik:
image: "traefik:v2.4"
container_name: "traefik"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik=true"
ports:
# HTTPS / SSL port
- "443:443"
# The Traefik Web UI port (enabled by api:insecure: true in traefik.yml)
- "8080:8080"
volumes:
- ./traefik/traefik.yml:/etc/traefik/traefik.yml:ro
- ./traefik/config.yml:/etc/traefik/config.yml:ro
- ./traefik/cert:/etc/certs:ro
- /var/run/docker.sock:/var/run/docker.sock:ro