-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 1004 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
45
46
47
48
49
50
51
version: "3.9"
services:
app:
container_name: app_api_py_app
build: .
env_file:
- .env
command: bash -c "
uvicorn src.main:app
--host 0.0.0.0 --port 8080
--reload --log-level debug
"
volumes:
- .:/home/code
ports:
- "8080:8080"
depends_on:
- db
db:
container_name: app_api_py_db
build:
context: ./db
dockerfile: Dockerfile
volumes:
- app_api_py_postgresql_data:/var/lib/postgresql/data
env_file:
- .env
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USER}
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $DB_NAME -U $DB_USER"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:latest
container_name: app_api_py_redis_redis
ports:
- "6379:6379"
env_file:
- .env
entrypoint: redis-server --appendonly yes
volumes:
app_api_py_postgresql_data: {}