Files
coastal_timesheet/docker/docker-compose.yml
T
BizzleBot 70ed672381 Fix: ManageUsers component missing useAuth() - caused blank admin page
The ManageUsers sub-component referenced user?.role for conditional
role dropdown options but didn't call useAuth() to get the user object.
This caused 'user is not defined' JS errors and blank admin pages.

Browser E2E: 20/20 tests pass.
2026-02-16 20:24:34 +00:00

100 lines
2.5 KiB
YAML

name: timesheet
services:
db:
image: postgres:16-alpine
container_name: timesheet-db
restart: unless-stopped
environment:
POSTGRES_USER: coastal
POSTGRES_PASSWORD: ${DB_PASSWORD:-coastal_secret}
POSTGRES_DB: coastal_timesheet
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U coastal -d coastal_timesheet']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- coastal
deploy:
resources:
limits:
memory: 256M
backend:
build:
context: ../
dockerfile: docker/backend/Dockerfile
container_name: timesheet-backend
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgresql://coastal:${DB_PASSWORD:-coastal_secret}@db:5432/coastal_timesheet
JWT_SECRET: ${JWT_SECRET:-change-me-in-production-jwt-secret-2026}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-change-me-in-production-refresh-secret-2026}
PORT: '3004'
NODE_ENV: production
CORS_ORIGINS: https://ts.bizzle.cloud,http://localhost
SMTP_HOST: ${SMTP_HOST:-}
SMTP_PORT: ${SMTP_PORT:-587}
SMTP_USER: ${SMTP_USER:-}
SMTP_PASS: ${SMTP_PASS:-}
SMTP_FROM: ${SMTP_FROM:-}
ADMIN_EMAIL: ${ADMIN_EMAIL:-bizzle@coastalcontracting.com}
ports:
- '127.0.0.1:3004:3004'
- '172.18.0.1:3004:3004'
healthcheck:
test: ['CMD', 'node', '-e', "fetch('http://localhost:3004/api/health').then(r=>{if(!r.ok)throw 1}).catch(()=>process.exit(1))"]
interval: 15s
timeout: 5s
retries: 3
start_period: 30s
networks:
- coastal
deploy:
resources:
limits:
memory: 256M
frontend:
build:
context: ../
dockerfile: docker/frontend/Dockerfile
container_name: timesheet-frontend
restart: unless-stopped
depends_on:
backend:
condition: service_healthy
ports:
- '127.0.0.1:8083:80'
- '172.18.0.1:8083:80'
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
healthcheck:
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:80/']
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
networks:
- coastal
deploy:
resources:
limits:
memory: 128M
volumes:
pgdata:
external: true
name: coastal_pgdata
networks:
coastal:
driver: bridge