-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.collab.yml
More file actions
34 lines (34 loc) · 1.23 KB
/
docker-compose.collab.yml
File metadata and controls
34 lines (34 loc) · 1.23 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
services:
hocuspocus:
image: node:22-alpine
container_name: tasknebula-hocuspocus
restart: unless-stopped
working_dir: /app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
AUTH_SECRET: ${AUTH_SECRET:?AUTH_SECRET must be set (generate with `openssl rand -base64 32`)}
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-tasknebula}
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379
HOCUSPOCUS_PORT: 1234
NODE_ENV: ${NODE_ENV:-production}
ports:
- '127.0.0.1:${HOCUSPOCUS_PORT:-1234}:1234'
volumes:
- ./services/hocuspocus:/app
# Install only on first boot; subsequent restarts skip when node_modules
# is already present.
command: >-
sh -c "if [ ! -d node_modules ]; then npm install --no-audit --no-fund --omit=dev; fi &&
node src/server.mjs"
healthcheck:
test:
- CMD-SHELL
- "node -e \"require('net').createConnection(1234,'127.0.0.1').on('connect',()=>process.exit(0)).on('error',()=>process.exit(1))\""
interval: 30s
timeout: 5s
start_period: 20s
retries: 3