-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yml
40 lines (38 loc) · 865 Bytes
/
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
39
40
services:
app:
build: .
command:
sh -c "
python3 wait_for_db.py &&
alembic upgrade head &&
python3 -m uvicorn app.main:base_app --host 0.0.0.0 --port 8000 --reload"
environment:
MAPBOX_ACCESS_TOKEN: "pk.eyJ1Ijoia2l0bmVraXQiLCJhIjoiY2x2aWVqazM4MWd5ZzJqcDVldTgxeGs3YyJ9.KYUkM4Imga0-5U0jukxVFA"
volumes:
- ./:/app
ports:
- "8000:8000"
depends_on:
- db
restart: always
db:
container_name: postgres
image: postgres:14.8-alpine
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "postgres_local"
volumes:
- ./data:/var/lib/postgresql/data
expose:
- "5432"
ports:
- "5433:5432"
restart: always
migration:
build: .
volumes:
- ./:/app
depends_on:
- db
restart: "no"