-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprod.docker-compose.yml
More file actions
50 lines (47 loc) · 1.11 KB
/
Copy pathprod.docker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.11 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
services:
database:
image: postgres:17
container_name: obooks-db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- obooks-volume:/var/lib/postgresql/data
- ./scripts:/scripts:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 3s
retries: 5
networks:
- dokploy-network
api:
container_name: obooks-api
build:
context: .
dockerfile: prod.Dockerfile
restart: unless-stopped
volumes:
- obooks-images:/app/public/images
env_file:
- .env
expose:
- ${PORT}
depends_on:
database:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:${PORT}/api/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- dokploy-network
volumes:
obooks-volume:
obooks-images:
networks:
dokploy-network:
external: true