Skip to content

Instantly share code, notes, and snippets.

@jeremyosih
Created August 12, 2025 07:44
Show Gist options
  • Save jeremyosih/3ee0eab51f106b86c274767d71e07748 to your computer and use it in GitHub Desktop.
Save jeremyosih/3ee0eab51f106b86c274767d71e07748 to your computer and use it in GitHub Desktop.
Docker Compose Wuzapi Coolify
services:
change-vol-ownership:
image: ubuntu
user: root
restart: 'no'
volumes:
- 'wuzapi-dbdata:/tmp/wuzapi-dbdata'
- 'wuzapi-files:/tmp/wuzapi-files'
command: 'bash -lc "chown -R 1000:1000 /tmp/wuzapi-dbdata && chown -R 1000:1000 /tmp/wuzapi-files && echo ok"'
db:
image: 'postgres:16-alpine'
restart: always
volumes:
- 'postgres-data:/var/lib/postgresql/data'
environment:
- 'POSTGRES_USER=${DB_USER:-wuzapi}'
- 'POSTGRES_PASSWORD=${DB_PASSWORD:-changeme}'
- 'POSTGRES_DB=${DB_NAME:-wuzapi}'
healthcheck:
test:
- CMD-SHELL
- 'pg_isready -U ${DB_USER:-wuzapi} -d ${DB_NAME:-wuzapi}'
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
wuzapi-server:
build:
context: 'https://github.com/asternic/wuzapi.git#main'
dockerfile: Dockerfile
restart: on-failure
expose:
- '8080'
volumes:
- 'wuzapi-dbdata:/app/dbdata'
- 'wuzapi-files:/app/files'
environment:
- SERVICE_FQDN_WUZAPI_SERVER_8080
- 'DB_HOST=${DB_HOST:-db}'
- 'DB_PORT=${DB_PORT:-5432}'
- 'DB_NAME=${DB_NAME:-wuzapi}'
- 'DB_USER=${DB_USER:-wuzapi}'
- 'DB_PASSWORD=${DB_PASSWORD:-changeme}'
- 'DB_SSLMODE=${DB_SSLMODE:-disable}'
- 'WUZAPI_ADMIN_TOKEN=${WUZAPI_ADMIN_TOKEN:-changeme}'
- 'SESSION_DEVICE_NAME=${SESSION_DEVICE_NAME:-WuzAPI}'
- 'TZ=${TZ:-America/Sao_Paulo}'
- 'WEBHOOK_FORMAT=${WEBHOOK_FORMAT:-json}'
depends_on:
change-vol-ownership:
condition: service_completed_successfully
db:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- 'curl -fsS http://localhost:8080/api/ || exit 1'
interval: 10s
timeout: 5s
retries: 30
start_period: 30s
image: ''
volumes:
postgres-data: { }
wuzapi-dbdata: { }
wuzapi-files: { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment