Files

54 lines
1.4 KiB
YAML
Raw Permalink Normal View History

version: '3.8'
services:
server:
build: .
container_name: collabtable-server
restart: unless-stopped
environment:
- PORT=3000
- NODE_ENV=production
# 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
# 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
ports:
- "3000:3000"
volumes:
- sqlite_data:/data
networks:
- collabtable-network
# 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
volumes:
sqlite_data:
# pg_data:
networks:
collabtable-network:
driver: bridge