wwebjs-api/docker-compose.yml
M Firdaus Riawan 85dbb14b28
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
2026-02-24 23:01:46 +02:00

22 lines
522 B
YAML

# The version property is now optional in modern Docker Compose
# version: '3.8'
name: wwebjs-api
services:
api:
image: avoylenko/wwebjs-api:latest
container_name: wwebjs-api
restart: always
ports:
- "${PORT:-3000}:3000"
env_file: .env
volumes:
- ./sessions:/usr/src/app/sessions
# Optional healthcheck
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 40s