GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MyJob/docker-compose.production.yml at main · anthrodjear/MyJob

Expand file tree

/

docker-compose.production.yml

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
244 lines (234 loc) · 6.35 KB
/

docker-compose.production.yml

Copy path

File metadata and controls

244 lines (234 loc) · 6.35 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# =============================================================================
# Production Docker Compose - Security Hardened
# Usage: docker compose -f docker-compose.yml -f docker-compose.production.yml up -d
# =============================================================================
services:
# ---------------------------------------------------------------------------
# NGINX - Reverse Proxy & TLS Termination
# ---------------------------------------------------------------------------
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- nginx-ssl-certs:/etc/nginx/ssl:ro
- nginx-logs:/var/log/nginx
depends_on:
api:
condition: service_healthy
frontend:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-fs", "http://localhost/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
- myjob-net
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /var/cache/nginx
- /var/run
- /tmp
# ---------------------------------------------------------------------------
# POSTGRES - Primary Database
# ---------------------------------------------------------------------------
postgres:
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- CHOWN
- SETUID
- SETGID
- FOWNER
- DAC_READ_SEARCH
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- myjob-net
# ---------------------------------------------------------------------------
# REDIS - Cache & Session Store
# ---------------------------------------------------------------------------
redis:
restart: unless-stopped
command: >
redis-server
--requirepass ${REDIS_PASSWORD:-}
--maxmemory 256mb
--maxmemory-policy allkeys-lru
--appendonly yes
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- SETUID
- SETGID
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-}", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- myjob-net
# ---------------------------------------------------------------------------
# API - Backend Application Server
# ---------------------------------------------------------------------------
api:
restart: unless-stopped
ports: [] # Internal only — nginx proxies external traffic
environment:
APP_ENV: production
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health || exit 1"]
interval: 15s
timeout: 5s
retries: 3
start_period: 60s
networks:
- myjob-net
# ---------------------------------------------------------------------------
# WORKER - Background Job Processor
# ---------------------------------------------------------------------------
worker:
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
networks:
- myjob-net
# ---------------------------------------------------------------------------
# BROWSER-AGENT - Headless Chromium Automation
# ---------------------------------------------------------------------------
browser-agent:
restart: unless-stopped
ports: [] # Internal only — nginx proxies /browser/ internally
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- SYS_ADMIN
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
networks:
- myjob-net
# ---------------------------------------------------------------------------
# FRONTEND - Static Asset Server / SSR
# ---------------------------------------------------------------------------
frontend:
restart: unless-stopped
ports: [] # Internal only — nginx proxies external traffic
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
networks:
- myjob-net
# ---------------------------------------------------------------------------
# LIVEKIT - Real-Time Communication Server
# ---------------------------------------------------------------------------
livekit:
restart: unless-stopped
ports: [] # Internal only — nginx proxies WebSocket at /livekit
security_opt:
- no-new-privileges:true
networks:
- myjob-net
# =============================================================================
# Volumes
# =============================================================================
volumes:
postgres_data:
driver: local
redis_data:
driver: local
storage_data:
driver: local
nginx-ssl-certs:
driver: local
nginx-logs:
driver: local
# =============================================================================
# Networks
# =============================================================================
networks:
myjob-net:
driver: bridge
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.