2025-10-24 20:27:18 +02:00
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
server:
|
|
|
|
|
build: .
|
|
|
|
|
container_name: collabtable-server
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
- PORT=3000
|
|
|
|
|
- NODE_ENV=production
|
2025-10-25 17:33:48 +02:00
|
|
|
# Authentication (optional but recommended)
|
|
|
|
|
- SERVER_PASSWORD=change_me
|
|
|
|
|
# Database selection: sqlite | postgres (default sqlite)
|
|
|
|
|
- DB_CLIENT=sqlite
|
|
|
|
|
# SQLite path (used when DB_CLIENT=sqlite)
|
|
|
|
|
- DB_PATH=/data/collabtable.db
|
2026-06-03 17:09:31 +02:00
|
|
|
# Retry DB initialization instead of crashing immediately on startup races
|
|
|
|
|
- DB_INIT_RETRY_INTERVAL_MS=5000
|
|
|
|
|
- DB_INIT_RETRY_MAX_ATTEMPTS=0
|
|
|
|
|
# Clamp future client timestamps during sync to avoid resend loops
|
|
|
|
|
- SYNC_MAX_FUTURE_SKEW_MS=0
|
2025-10-25 17:33:48 +02:00
|
|
|
# PostgreSQL (used when DB_CLIENT=postgres) - choose either DATABASE_URL or the PG* vars
|
|
|
|
|
# - DATABASE_URL=postgres://user:password@postgres:5432/collabtable
|
|
|
|
|
# - PGHOST=postgres
|
|
|
|
|
# - PGPORT=5432
|
|
|
|
|
# - PGUSER=postgres
|
|
|
|
|
# - PGPASSWORD=yourpassword
|
|
|
|
|
# - PGDATABASE=collabtable
|
2025-10-24 20:27:18 +02:00
|
|
|
ports:
|
|
|
|
|
- "3000:3000"
|
|
|
|
|
volumes:
|
|
|
|
|
- sqlite_data:/data
|
|
|
|
|
networks:
|
|
|
|
|
- collabtable-network
|
|
|
|
|
|
2025-10-25 17:33:48 +02:00
|
|
|
# Optional PostgreSQL database
|
|
|
|
|
# postgres:
|
|
|
|
|
# image: postgres:16-alpine
|
|
|
|
|
# container_name: collabtable-postgres
|
|
|
|
|
# restart: unless-stopped
|
|
|
|
|
# environment:
|
|
|
|
|
# - POSTGRES_DB=collabtable
|
|
|
|
|
# - POSTGRES_USER=postgres
|
|
|
|
|
# - POSTGRES_PASSWORD=yourpassword
|
|
|
|
|
# ports:
|
|
|
|
|
# - "5432:5432"
|
|
|
|
|
# volumes:
|
|
|
|
|
# - pg_data:/var/lib/postgresql/data
|
|
|
|
|
# networks:
|
|
|
|
|
# - collabtable-network
|
|
|
|
|
|
2025-10-24 20:27:18 +02:00
|
|
|
volumes:
|
|
|
|
|
sqlite_data:
|
2025-10-25 17:33:48 +02:00
|
|
|
# pg_data:
|
2025-10-24 20:27:18 +02:00
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
collabtable-network:
|
|
|
|
|
driver: bridge
|