feat: update docker-compose with configurable environment variables
This commit is contained in:
@@ -8,22 +8,26 @@ services:
|
|||||||
container_name: pnger
|
container_name: pnger
|
||||||
image: pnger:latest
|
image: pnger:latest
|
||||||
ports:
|
ports:
|
||||||
- "8080:3000"
|
- "${HOST_PORT:-8080}:3000"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=${NODE_ENV:-production}
|
||||||
- PORT=3000
|
- PORT=3000
|
||||||
- MAX_FILE_SIZE=10
|
- MAX_FILE_SIZE=${MAX_FILE_SIZE:-10485760}
|
||||||
|
- TEMP_DIR=/app/temp
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
mem_limit: 512m
|
mem_limit: ${MEM_LIMIT:-512m}
|
||||||
cpus: 1.0
|
cpus: ${CPU_LIMIT:-1.0}
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
max-size: "10m"
|
max-size: "10m"
|
||||||
max-file: "3"
|
max-file: "3"
|
||||||
|
# Optional: mount temp directory if you want persistence
|
||||||
|
# volumes:
|
||||||
|
# - ./temp:/app/temp
|
||||||
Reference in New Issue
Block a user