-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yaml
56 lines (51 loc) · 1.02 KB
/
compose.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
services:
app:
hostname: app
container_name: app
build:
dockerfile: Dockerfile.dev
restart: always
ports:
- 8000:8000
env_file:
- ./.env
depends_on:
db:
condition: service_healthy
networks:
- fastapi_demo_net
db:
image: postgres:16.3
hostname: postgres_db
container_name: postgres_db
restart: always
user: ${POSTGRES_USER}
ports:
- 5432:5432
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres-db:/var/lib/postgresql/data
networks:
- fastapi_demo_net
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
adminer:
image: adminer:4.8.1
hostname: adminer
container_name: adminer
restart: always
ports:
- 8080:8080
networks:
- fastapi_demo_net
volumes:
postgres-db:
networks:
fastapi_demo_net:
name: fastapi_demo_net