-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
65 lines (60 loc) · 1.29 KB
/
compose.yml
File metadata and controls
65 lines (60 loc) · 1.29 KB
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
57
58
59
60
61
62
63
64
65
services:
db:
image: postgres:17.7
env_file: .env
restart: always
shm_size: 128mb
environment:
POSTGRES_USER: ${RDS_USERNAME}
POSTGRES_DB: ${RDS_DB_NAME}
POSTGRES_PASSWORD: ${RDS_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${RDS_USERNAME} -d ${RDS_DB_NAME}"]
interval: 1s
timeout: 5s
retries: 10
volumes:
- fastapi_pgdata:/var/lib/postgresql/data
ports:
- 5432:5432
adminer:
image: adminer
restart: always
depends_on:
db:
condition: service_healthy
ports:
- 8080:8080
fastapiapp:
build:
dockerfile: Dockerfile
context: .
image: fastapiapp:latest
container_name: fastapiapp
depends_on:
db:
condition: service_started
restart: true
env_file: .env
environment:
RDS_HOSTNAME: db
restart: always
develop:
watch:
- action: rebuild
path: ./app
target: /app
ignore:
- __pycache__
- action: rebuild
path: uv.lock
- action: rebuild
path: pyproject.toml
- action: rebuild
path: alembic/versions
ignore:
- __pycache__
ports:
- 8000:8000
volumes:
fastapi_pgdata: