From 85dbb14b28924583758c7a06227af3c07a5d686a Mon Sep 17 00:00:00 2001 From: M Firdaus Riawan <66874830+sonarta@users.noreply.github.com> Date: Wed, 25 Feb 2026 04:01:46 +0700 Subject: [PATCH] feat: allow host port to be configured via environment variable in Docker (#65) * feat: add reverse proxy support with configurable base path and trust proxy settings * fix: ensure environment variables are loaded correctly in Docker - Move dotenv config to the top of server.js - Update docker-compose.yml to properly handle .env file - Remove duplicate environment variables section This ensures BASE_PATH and TRUST_PROXY work as expected in both Docker and local environments. * refactor: remove hardcoded environment variables from docker-compose.yml * feat: Allow host port to be configured via .env --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1830936..41d618a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: container_name: wwebjs-api restart: always ports: - - "3000:3000" + - "${PORT:-3000}:3000" env_file: .env volumes: - ./sessions:/usr/src/app/sessions