-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (39 loc) · 977 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (39 loc) · 977 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
version: '3.9'
services:
api:
build: .
ports:
- '3001:3001'
env_file: .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-parashield}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-parashield}
POSTGRES_DB: ${POSTGRES_DB:-parashield}
ports:
- '127.0.0.1:5432:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-parashield}']
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- '127.0.0.1:6379:6379'
command: redis-server --requirepass ${REDIS_PASSWORD:-redispass}
healthcheck:
test: ['CMD', 'redis-cli', '-a', '${REDIS_PASSWORD:-redispass}', 'ping']
interval: 5s
timeout: 5s
retries: 5
volumes:
pgdata: