-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (36 loc) · 993 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (36 loc) · 993 Bytes
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
services:
renderer:
build: .
container_name: open-browser-rendering
restart: unless-stopped
ports:
- "${PORT:-3000}:3000"
environment:
- RENDERER_API_KEY=${RENDERER_API_KEY:-supersecret123}
- PORT=3000
- MAX_CONCURRENCY=${MAX_CONCURRENCY:-2}
- BROWSER_ENGINE=${BROWSER_ENGINE:-chromium}
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-*}
- NODE_ENV=production
deploy:
resources:
limits:
cpus: '2.0'
memory: '2g'
reservations:
cpus: '0.5'
memory: '512m'
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Security options
security_opt:
- no-new-privileges:true
# Read-only root filesystem (except /tmp)
read_only: true
tmpfs:
- /tmp
- /app/.cache