From e581b3339bd922c5020309149c2696297ce35138 Mon Sep 17 00:00:00 2001 From: jason Date: Sat, 7 Mar 2026 23:05:53 -0600 Subject: [PATCH] feat: update docker-compose with configurable environment variables --- docker-compose.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f680a8f..c06cc39 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,22 +8,26 @@ services: container_name: pnger image: pnger:latest ports: - - "8080:3000" + - "${HOST_PORT:-8080}:3000" environment: - - NODE_ENV=production + - NODE_ENV=${NODE_ENV:-production} - PORT=3000 - - MAX_FILE_SIZE=10 + - MAX_FILE_SIZE=${MAX_FILE_SIZE:-10485760} + - TEMP_DIR=/app/temp restart: unless-stopped 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 timeout: 5s retries: 3 start_period: 10s - mem_limit: 512m - cpus: 1.0 + mem_limit: ${MEM_LIMIT:-512m} + cpus: ${CPU_LIMIT:-1.0} logging: driver: "json-file" options: max-size: "10m" - max-file: "3" \ No newline at end of file + max-file: "3" + # Optional: mount temp directory if you want persistence + # volumes: + # - ./temp:/app/temp \ No newline at end of file