forked from hngprojects/hng_boilerplate_python_fastapi_web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
36 lines (33 loc) · 810 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
services:
app_dev:
image: anchor-python-bp-dev:latest
command: ["sh", "-c", "alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port 7001 --reload"]
container_name: app_dev
networks:
- hng-network
restart: unless-stopped
ports:
- 7006:7001
working_dir: /app
volumes:
- .env:/app/.env
depends_on:
- dev_db
dev_db:
image: postgres:14.12
container_name: dev_db
restart: always
volumes:
- dev_db:/var/lib/postgresql/data
- .env:/app/.env
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD?Variable not set}
- POSTGRES_USER=${DB_USER?Variable not set}
- POSTGRES_DB=${DB_NAME?Variable not set}
networks:
- hng-network
volumes:
dev_db:
networks:
hng-network:
driver: bridge