timekeeper/docker-compose.yml
2026-01-15 20:59:31 +00:00

42 lines
1.2 KiB
YAML

version: "3.8"
services:
db:
image: postgres:16-alpine
container_name: timekeeper-db
environment:
POSTGRES_DB: timekeeper
POSTGRES_USER: timekeeper
POSTGRES_PASSWORD: timekeeper_pw
PGDATA: /var/lib/postgresql/data
volumes:
# Store Postgres data in the project root (creates ./postgres-data)
- ./postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U timekeeper -d timekeeper"]
interval: 10s
timeout: 5s
retries: 10
restart: unless-stopped
app:
build:
context: ./backend
container_name: timekeeper-app
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgresql+psycopg://timekeeper:timekeeper_pw@db:5432/timekeeper
SECRET_KEY: change-this-secret-key
DEFAULT_ADMIN_USER: Admin
DEFAULT_ADMIN_PASSWORD: 1Senior!
TZ: America/New_York
PAY_PERIOD_START_WEEKDAY: "0"
PAY_PERIOD_TYPE: BIWEEKLY
ports:
- "5070:5070"
volumes:
# Store uploaded Excel files in the project root (creates ./uploads)
- ./uploads:/app/uploads
restart: unless-stopped