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
This commit is contained in:
M Firdaus Riawan 2026-02-25 04:01:46 +07:00 • committed by GitHub
commit 85dbb14b28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ services:
container_name: wwebjs-api container_name: wwebjs-api
restart: always restart: always
ports: ports:
- "3000:3000" - "${PORT:-3000}:3000"
env_file: .env env_file: .env
volumes: volumes:
- ./sessions:/usr/src/app/sessions - ./sessions:/usr/src/app/sessions