-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
38 lines (33 loc) · 897 Bytes
/
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
version: '3.8'
services:
heavyweight_fastapi:
build: .
command: bash -c 'while !</dev/tcp/heavyweight_db/5432; do sleep 1; done; alembic upgrade head; uvicorn app.main:app --host 0.0.0.0 --port 8000'
volumes:
- .:/app
ports:
- 8000:8000
environment:
- SECRET_KEY=supersecretkey
- HASHING_ALGORITHM=HS256
- POSTGRES_DATABASE_URL=postgresql://heavyweight:backend@heavyweight_db:5432/heavyweight_db
depends_on:
- heavyweight_db
networks:
- heavyweight_network
heavyweight_db:
image: postgres:15-alpine
volumes:
- heavyweight_volume:/var/lib/postgresql/data
expose:
- 5432
environment:
- POSTGRES_USER=heavyweight
- POSTGRES_PASSWORD=backend
- POSTGRES_DB=heavyweight_db
networks:
- heavyweight_network
volumes:
heavyweight_volume:
networks:
heavyweight_network: