-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
60 lines (56 loc) · 1.53 KB
/
docker-compose.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: "3.8"
services:
traefik:
image: "traefik:latest"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
flask:
build:
context: .
depends_on:
- "traefik"
- "postgres"
volumes:
- "./webapp:/webapp/"
labels:
- "traefik.enable=true"
- "traefik.http.services.flask.loadbalancer.server.port=80"
- "traefik.http.routers.flask.rule=Host(`localhost`, `lvh.me`, `pfp.lvh.me`, `example.com`)"
- "traefik.http.routers.flask.entrypoints=web"
postgres:
image: "postgres:13"
depends_on:
- "traefik"
environment:
POSTGRES_DB: "dbase"
POSTGRES_USER: "dbuser"
POSTGRES_PASSWORD: "dbpass"
PGDATA: "/var/lib/postgresql/data"
volumes:
#- "./postgres_seed.sql:/docker-entrypoint-initdb.d/postgres_seed.sql"
- "./db-data:/var/lib/postgresql/data"
labels:
- "traefik.enable=false"
pgadmin:
image: "dpage/pgadmin4:latest"
depends_on:
- "traefik"
environment:
PGADMIN_DEFAULT_EMAIL: "[email protected]"
PGADMIN_DEFAULT_PASSWORD: "dbpass"
PGADMIN_LISTEN_PORT: "80"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`pga.lvh.me`)"
- "traefik.http.routers.whoami.entrypoints=web"
networks:
default:
name: "traefikNetwork"