-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
58 lines (51 loc) · 891 Bytes
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: '3.9'
volumes:
pg_data:
networks:
music_box:
driver: bridge
services:
db:
image: postgres:15
container_name: db_app
volumes:
- .:/app
# expose:
# - "5433"
ports:
- "5432:5432"
env_file:
- .env
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
networks:
- music_box
migrate:
build:
context: .
working_dir: /app
command: alembic upgrade head
depends_on:
- db
volumes:
- .:/app
networks:
- music_box
app:
build:
context: .
working_dir: /app
env_file:
- .env
container_name: music_app
volumes:
- .:/app
command: uvicorn run:app --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
depends_on:
- db
networks:
- music_box