-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
104 lines (97 loc) · 2.61 KB
/
docker-compose.yml
File metadata and controls
104 lines (97 loc) · 2.61 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
services:
# ─── Infrastructure ──────────────────────────────────────────────────────────
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: punkpay
POSTGRES_PASSWORD: punkpay_dev
POSTGRES_DB: punkpay
ports:
- '5433:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U punkpay']
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 512M
redis:
image: redis:7-alpine
command: redis-server --maxmemory 128mb --maxmemory-policy noeviction --requirepass ""
ports:
- '6379:6379'
volumes:
- redisdata:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 256M
signal-cli:
image: bbernhard/signal-cli-rest-api:latest
environment:
MODE: normal
ports:
- '8080:8080'
volumes:
- signal-cli-config:/home/.local/share/signal-cli
deploy:
resources:
limits:
memory: 256M
# ─── Application ─────────────────────────────────────────────────────────────
app:
build:
context: .
target: app
ports:
- '3000:3000'
env_file: .env
environment:
# Override localhost URLs from .env with container-network hostnames
DATABASE_URL: postgresql://punkpay:punkpay_dev@postgres:5432/punkpay
REDIS_URL: redis://redis:6379
SIGNAL_API_URL: http://signal-cli:8080
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
memory: 512M
worker:
build:
context: .
target: worker
env_file: .env
environment:
DATABASE_URL: postgresql://punkpay:punkpay_dev@postgres:5432/punkpay
REDIS_URL: redis://redis:6379
SIGNAL_API_URL: http://signal-cli:8080
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
app:
condition: service_started # ensures schema push runs before workers hit DB
restart: unless-stopped
deploy:
resources:
limits:
memory: 256M
volumes:
pgdata:
redisdata:
signal-cli-config: