# OpenProject - Project management
# Port: 8080
# Open source project management

version: "3.8"

services:
  db:
    image: postgres:16
    container_name: openproject-db
    restart: unless-stopped
    environment:
      POSTGRES_USER: openproject
      POSTGRES_PASSWORD: "REDACTED_PASSWORD"
      POSTGRES_DB: openproject
    volumes:
      - /home/homelab/docker/openproject/postgres:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U openproject -d openproject"]
      interval: 30s
      timeout: 5s
      retries: 5

  openproject:
    image: openproject/openproject:16.0.0-slim
    container_name: openproject
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy
    ports:
      - "8083:8080"
    environment:
      OPENPROJECT_HOST__NAME: "homelab.vish.local"   # 👈 replace with homelab’s LAN IP
      OPENPROJECT_DISABLE__HOST__NAME__CHECK: "true"
      OPENPROJECT_HTTPS: "false"
      OPENPROJECT_SECRET_KEY_BASE: "REDACTED_SECRET_KEY_BASE"_GITEA_TOKEN"
      OPENPROJECT_EE__MANAGER__VISIBLE: "false"
      DATABASE_URL: "postgresql://openproject:REDACTED_PASSWORD@db:5432/openproject"
    volumes:
      - /home/homelab/docker/openproject/assets:/var/openproject/assets
