-
Notifications
You must be signed in to change notification settings - Fork 264
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
135 lines (127 loc) · 2.89 KB
/
docker-compose.yml
File metadata and controls
135 lines (127 loc) · 2.89 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
services:
db:
image: 'postgres:latest'
container_name: postgres_theater
env_file:
- .env
ports:
- "5432:5432"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- postgres_theater_data:/var/lib/postgresql/data/
networks:
- theater_network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB -h 127.0.0.1 || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin_theater
ports:
- "3333:80"
env_file:
- .env
depends_on:
db:
condition: service_healthy
volumes:
- pgadmin_theater_data:/var/lib/pgadmin
networks:
- theater_network
web:
restart: always
build: .
container_name: backend_theater
command: [ "/bin/bash", "/commands/run_web_server_dev.sh" ]
env_file:
- .env
environment:
- LOG_LEVEL=debug
- PYTHONPATH=/usr/src/fastapi
- WATCHFILES_FORCE_POLLING=true
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
volumes:
- ./src:/usr/src/fastapi
networks:
- theater_network
migrator:
build: .
container_name: alembic_migrator_theater
command: ["/bin/bash", "/commands/run_migration.sh"]
depends_on:
db:
condition: service_healthy
volumes:
- ./src:/usr/src/fastapi
env_file:
- .env
environment:
- PYTHONPATH=/usr/src/fastapi
networks:
- theater_network
mailhog:
restart: always
build:
context: .
dockerfile: ./docker/mailhog/Dockerfile
container_name: mailhog_theater
command: ["/bin/bash", "-c", "/commands/setup_mailhog_auth.sh && /go/bin/MailHog"]
ports:
- "8025:8025"
- "1025:1025"
env_file:
- .env
environment:
MH_AUTH_FILE: /mailhog.auth
networks:
- theater_network
minio:
image: minio/minio:latest
container_name: minio-theater
command: server --console-address ":9001" /data
ports:
- "9000:9000"
- "9001:9001"
env_file:
- .env
volumes:
- minio_data:/data
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- theater_network
minio_mc:
build:
context: .
dockerfile: docker/minio_mc/Dockerfile
container_name: minio_mc_theater
command: ["/bin/sh", "-c", "/commands/setup_minio.sh"]
depends_on:
minio:
condition: service_healthy
env_file:
- .env
networks:
- theater_network
volumes:
postgres_theater_data:
driver: local
pgadmin_theater_data:
driver: local
minio_data:
driver: local
networks:
theater_network:
driver: bridge