-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (40 loc) · 890 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
42
43
44
version: "3.9"
networks:
db:
volumes:
pgdata:
services:
filebox-backend:
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
ports:
- "0.0.0.0:8000:8000"
command: ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
depends_on:
db:
condition: service_healthy
networks:
- db
environment:
DATABASE_URI: "postgresql+asyncpg://test:test@db:5432/test"
db:
image: postgres:alpine
restart: unless-stopped
user: postgres
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 1s
timeout: 5s
retries: 10
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- db