-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (43 loc) · 923 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
44 lines (43 loc) · 923 Bytes
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
services:
app:
build:
context: .
dockerfile: ./docker/Dockerfile
command: ["python", "main.py"]
env_file:
- path: .env
required: false
environment:
DATABASE_URI: postgresql+asyncpg://develop:develop@db/develop
depends_on:
- db
ports:
- "8080:8080"
volumes:
- ./:/app
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- "5432:5432"
environment:
POSTGRES_USER: develop
POSTGRES_PASSWORD: develop
POSTGRES_DB: develop
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER" ]
interval: 50s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
healthcheck:
test: [ "CMD", "redis-cli","ping" ]
interval: 1m20s
timeout: 5s
retries: 3
ports:
- "6379:6379"
volumes:
postgres_data: