-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (71 loc) · 1.75 KB
/
docker-compose.yml
File metadata and controls
76 lines (71 loc) · 1.75 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
73
74
75
76
name: playful-programming-cms
services:
pgsql:
image: postgres:16.10-alpine3.22
env_file:
- .env
volumes:
- pgsql_storage:/var/lib/postgresql/data
- pgsql_backups:/backups
healthcheck:
test: ["CMD", "pg_isready", "-U", "$POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
redis:
image: redis:8.2.1-alpine3.22
volumes:
- redis_storage:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio
ports:
- "9000:9000" # API Port
- "9001:9001" # Web UI Port
volumes:
- minio_storage:/data
environment:
MINIO_ROOT_USER: ${S3_KEY_ID}
MINIO_ROOT_PASSWORD: ${S3_KEY_SECRET}
command: server --console-address ":9001" /data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 5
app:
build: .
env_file:
- .env
environment:
S3_ENDPOINT: http://minio:9000
POSTGRES_URL: postgresql://postgres:unicorn@pgsql:5432/postgres
REDIS_URL: redis://redis:6379
ports:
- "3000:3000"
depends_on: [pgsql, redis, minio]
profiles: [app]
healthcheck:
test: wget --no-verbose --tries=1 --spider http://0.0.0.0:3000 && wget --no-verbose --tries=1 --spider http://0.0.0.0:3001 || exit 1
interval: 10s
timeout: 5s
retries: 5
develop:
watch:
- path: .
action: rebuild
post_start:
- command: node --experimental-strip-types packages/db/scripts/migrate.ts
volumes:
pgsql_storage: {}
pgsql_backups: {}
redis_storage: {}
minio_storage: {}