-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (49 loc) · 1.02 KB
/
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
52
53
services:
application:
build: app
env_file:
- .env.dev
restart: unless-stopped
volumes:
- ./app:/app
ports:
- '8000:8000'
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
database:
image: postgres:16.2-alpine3.18
env_file: .env.dev
restart: unless-stopped
ports:
- '5555:5432'
volumes:
- database-storage:/var/lib/postgresql/data
healthcheck:
test: [ 'CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}' ]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
cpus: '1'
memory: 1G
redis:
image: redis:7.4-alpine
container_name: redis
ports:
- '6379:6379'
volumes:
- redis_data:/data
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
interval: 1s
timeout: 3s
retries: 5
volumes:
database-storage:
redis_data: