-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
47 lines (43 loc) · 966 Bytes
/
Copy pathdocker-compose.yaml
File metadata and controls
47 lines (43 loc) · 966 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
39
40
41
42
43
44
45
46
47
services:
api:
image: pyapi:latest
build: .
container_name: pyapi-api
restart: unless-stopped
command:
- "sh"
- "-c"
- "uvicorn pyapi.main.api:create_app --factory --host $${API_HOST} --port $${API_PORT}"
ports:
- "8000:8000"
networks:
- pyapi-network
env_file:
- env/api.env
postgres_migration:
image: pyapi:latest
build: .
container_name: pyapi-postgres-migration
command: alembic upgrade head
networks:
- pyapi-network
env_file:
- env/api.env
postgres:
image: postgres:18-alpine
container_name: pyapi-postgres
hostname: postgres
restart: unless-stopped
ports:
- "5432:5432"
networks:
- pyapi-network
volumes:
- pyapi-postgres-data:/var/lib/postgresql/data:rw
env_file: env/postgres.env
volumes:
pyapi-postgres-data:
name: pyapi-postgres-data
networks:
pyapi-network:
name: pyapi-network