wwebjs-api/docker-compose.yml
M Firdaus Riawan b4d66648bd
fix: Environment variable override in Docker Compose (#54)
* 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
2025-09-10 18:20:38 +03:00

22 lines
513 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:
- "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