Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (70 loc) · 2.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
78 lines (70 loc) · 2.54 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
services:
app:
# This example mounts Bolt and Ansible projects, so it uses the toolchain image.
image: example42/pabawi:batteries
container_name: pabawi
env_file:
- .env
volumes:
# All Pabawi data lives under /opt/pabawi inside the container.
# Mount host directories to the matching container paths.
# SQLite database persistence (required)
- ./data:/opt/pabawi/data
# Bolt project directory (required, read-only)
- ./bolt-project:/opt/pabawi/bolt-project:ro
# Hiera control repository (optional)
# - /path/to/control-repo:/opt/pabawi/control-repo:ro
# Ansible project directory (optional)
# - /path/to/ansible:/opt/pabawi/ansible:ro
# SSL certificates for PuppetDB/Puppetserver/Proxmox (optional)
# - /path/to/certs:/opt/pabawi/certs:ro
# SSH keys and config for SSH integration (optional)
# - ~/.ssh:/opt/pabawi/ssh:ro
ports:
- "${PORT:-3000}:3000"
healthcheck:
test: ["CMD", "node", "-e", "const http=require('http');http.get('http://localhost:3000/api/health',(r)=>{let d='';r.on('data',c=>d+=c);r.on('end',()=>{try{const j=JSON.parse(d);process.exit(r.statusCode===200&&j.status==='ok'?0:1)}catch{process.exit(1)}})}).on('error',()=>process.exit(1))"]
interval: 30s
timeout: 3s
start_period: 30s
retries: 3
restart: unless-stopped
deploy:
resources:
limits:
memory: 1g
networks:
- pabawi-network
# PostgreSQL backend (optional). Started only with the "postgres" profile:
# docker compose --profile postgres up
# To make the app use it, set in .env:
# DB_TYPE=postgres
# DATABASE_URL=postgres://pabawi:pabawi@postgres:5432/pabawi
#
# For an isolated, self-contained PostgreSQL test stack (separate project,
# builds the app from local source), see scripts/docker-postgres-test.sh.
postgres:
image: postgres:16-alpine
container_name: pabawi-postgres
profiles:
- postgres
environment:
POSTGRES_USER: "${POSTGRES_USER:-pabawi}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-pabawi}"
POSTGRES_DB: "${POSTGRES_DB:-pabawi}"
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-pabawi} -d ${POSTGRES_DB:-pabawi}"]
interval: 10s
timeout: 3s
start_period: 5s
retries: 5
restart: unless-stopped
networks:
- pabawi-network
networks:
pabawi-network:
driver: bridge