-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (39 loc) · 996 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
39
40
41
version: "3.9"
services:
app:
build: .
ports:
- "8000:8000"
environment:
- DEBUG=True
- DB_URL=postgresql+asyncpg://postgres:postgres@postgres:5432/postgres
- FACEPLUSPLUS_API_KEY=API_KEY
- FACEPLUSPLUS_API_SECRET=API_SECRET
env_file:
- .env
depends_on:
postgres:
condition: service_started
migrate:
condition: service_completed_successfully
command: uvicorn app.main:create_app --factory --host 0.0.0.0 --port 8000
migrate:
build: .
environment:
- DB_URL=postgresql+asyncpg://postgres:postgres@postgres:5432/postgres
depends_on:
postgres:
condition: service_started
command: alembic upgrade head
postgres:
image: postgres
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5