-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 1.78 KB
/
docker-compose.yml
File metadata and controls
72 lines (68 loc) · 1.78 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
services:
app:
build:
context: .
dockerfile: Dockerfile
target: prod
restart: unless-stopped
ports:
- ${PORT}:${PORT}
environment:
APP_ENV: ${APP_ENV}
PORT: ${PORT}
BLUEPRINT_DB_HOST: ${BLUEPRINT_DB_HOST}
BLUEPRINT_DB_PORT: ${BLUEPRINT_DB_PORT}
BLUEPRINT_DB_DATABASE: ${BLUEPRINT_DB_DATABASE}
BLUEPRINT_DB_USERNAME: ${BLUEPRINT_DB_USERNAME}
BLUEPRINT_DB_PASSWORD: ${BLUEPRINT_DB_PASSWORD}
BLUEPRINT_DB_SCHEMA: ${BLUEPRINT_DB_SCHEMA}
REDIS_URL: redis:6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_DB: ${REDIS_DB}
depends_on:
psql_bp:
condition: service_healthy
redis:
condition: service_healthy
networks:
- blueprint
psql_bp:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${BLUEPRINT_DB_DATABASE}
POSTGRES_USER: ${BLUEPRINT_DB_USERNAME}
POSTGRES_PASSWORD: ${BLUEPRINT_DB_PASSWORD}
ports:
- "${BLUEPRINT_DB_PORT}:5432"
volumes:
- psql_volume_bp:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${BLUEPRINT_DB_USERNAME} -d ${BLUEPRINT_DB_DATABASE}'"]
interval: 5s
timeout: 5s
retries: 3
start_period: 15s
networks:
- blueprint
redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 512mb --maxmemory-policy allkeys-lru
ports:
- "6379:6379"
volumes:
- redis_volume:/data
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
networks:
- blueprint
volumes:
psql_volume_bp:
redis_volume:
networks:
blueprint: