-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (48 loc) · 1.16 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
x-restart-policy: &restart_policy
# our policy is always restart the container unless it is explicitly stopped
# or Docker daemon is restarted
restart: unless-stopped
services:
database:
<<: *restart_policy
image: "postgres:15-alpine"
ports:
- "5432:5432"
volumes:
- "express-database:/var/lib/postgresql/data"
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
interval: 10s
timeout: 3s
retries: 10
start_period: 15s
redis:
<<: *restart_policy
image: "redis:7-alpine"
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 10
start_period: 15s
bull-board:
<<: *restart_policy
image: "venatum/bull-board:latest"
ports:
- "4000:3000"
environment:
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
depends_on:
- redis
volumes:
express-database:
external: true