forked from asternic/wuzapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (47 loc) · 1.22 KB
/
docker-compose.yml
File metadata and controls
52 lines (47 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
services:
wuzapi-server:
build:
context: .
dockerfile: Dockerfile
ports:
#- "${WUZAPI_PORT:-8080}:8080"
- "8080"
environment:
- WUZAPI_ADMIN_TOKEN=${WUZAPI_ADMIN_TOKEN}
- DB_USER=${DB_USER:-wuzapi}
- DB_PASSWORD=${DB_PASSWORD:-wuzapi}
- DB_NAME=${DB_NAME:-wuzapi}
- DB_HOST=db
- DB_PORT=${DB_PORT:-5432}
- TZ=${TZ:-America/Sao_Paulo}
- WEBHOOK_FORMAT=${WEBHOOK_FORMAT:-json}
- SESSION_DEVICE_NAME=${SESSION_DEVICE_NAME:-WuzAPI}
depends_on:
db:
condition: service_healthy
networks:
- wuzapi-network
restart: on-failure
db:
image: postgres:16
environment:
POSTGRES_USER: ${DB_USER:-wuzapi}
POSTGRES_PASSWORD: ${DB_PASSWORD:-wuzapi}
POSTGRES_DB: ${DB_NAME:-wuzapi}
# ports:
# - "${DB_PORT:-5432}:5432" # Uncomment to access the database directly from your host machine.
volumes:
- db_data:/var/lib/postgresql/data
networks:
- wuzapi-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-wuzapi}"]
interval: 5s
timeout: 5s
retries: 5
restart: always
networks:
wuzapi-network:
driver: bridge
volumes:
db_data: