- Add permissions logic for status options in corrective actions. - Create tests for permissions functionality. - Implement queries for user authentication and actions management. - Develop Actions page to display and manage corrective actions. - Create authentication pages for login, setup, and password reset. - Add IncidentDetail page to view incident details and associated actions. - Implement Settings page for user management and password changes.
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
# Production setup: the app plus PostgreSQL.
|
|
# cp .env.example .env # set POSTGRES_PASSWORD (and PUBLIC_URL if not localhost)
|
|
# docker compose up -d
|
|
# Then open http://localhost:3000 and complete first-run setup.
|
|
|
|
services:
|
|
db:
|
|
image: postgres:18-alpine
|
|
environment:
|
|
POSTGRES_USER: safetylog
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
|
|
POSTGRES_DB: safetylog
|
|
volumes:
|
|
- db-data:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U safetylog -d safetylog"]
|
|
interval: 5s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
app:
|
|
build: .
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgres://safetylog:${POSTGRES_PASSWORD}@db:5432/safetylog
|
|
PUBLIC_URL: ${PUBLIC_URL:-http://localhost:3000}
|
|
SMTP_URL: ${SMTP_URL:-}
|
|
MAIL_FROM: ${MAIL_FROM:-Open SafetyLog EHS <no-reply@localhost>}
|
|
TZ: ${TZ:-UTC}
|
|
volumes:
|
|
- app-data:/app/data # uploaded photos and files
|
|
ports:
|
|
- "${PORT:-3000}:3000"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
db-data:
|
|
app-data:
|