How opf/openproject-docker-compose works
Project type and purpose
• This is not a source-code repository but a Docker-Compose installation kit for OpenProject (an open-source project management application).
• The goal is to spin up an OpenProject app stack (app server, database, reverse proxy) and provide “control plane” containers for backup and upgrade tasks.
File structure
• Top-level files:
• .env.example / .gitignore / README.md
• docker-compose.yml – main service definitions
• docker-compose.control.yml – definitions for control-plane containers (backup/upgrade)
• docker-compose.override.yml (user’s custom overrides, not in the repo)
• Directories:
• proxy/ – Dockerfile + Caddyfile.template for HTTPS reverse proxy
• control/ – Dockerfile + subfolders for backup and upgrade entrypoints and scripts
• Key patterns:
• A multi-container stack defined in Compose
• Two distinct “planes”: runtime (app + DB + proxy) and control (backup, upgrade)
• Use of named volumes for persistence, environment variables in .env
Extract architecture clues from README
• Runtime services:
• openproject (app)
• postgresql (database, persisted in compose_pgdata)
• proxy (Caddy server for TLS termination, optional / integrated)
• Control-plane services (launched via ‘docker-compose -f …control.yml run backup|upgrade’)
• Networks: likely a frontend (proxy ↔ openproject) and a backend (openproject ↔ postgres) network
• Volumes: opdata for uploads, pgdata for DB
Main components & interactions
a. Components:
1. OpenProject app container
2. PostgreSQL container
3. Caddy reverse-proxy container
4. Control-plane “backup” container
5. Control-plane “upgrade” container
6. Named Docker volumes: compose_opdata (assets), compose_pgdata (database)
7. Docker networks: front_net, back_net (names as in Compose)
8. .env file (holds environment variables injected into containers)
b. Relationships / Data flows:
• Caddy → OpenProject: HTTP(S) traffic forwarded from users to the app
• OpenProject → PostgreSQL: SQL queries over the backend network
• OpenProject → compose_opdata volume: reads/writes user-uploaded files
• PostgreSQL → compose_pgdata volume: persistent DB storage
• Control-plane containers:
• backup: mounts both volumes, runs dump scripts, writes backup artifacts (to host or another volume)
• upgrade: connects to DB and app’s code/config in container, runs upgrade scripts
Architectural patterns & principles
• Separation of concerns: runtime versus control plane
• Immutable infrastructure: containers built from specific images; no manual in-place modifications
• Infrastructure as code: full stack defined declaratively in docker-compose.yml files
• Sidecar/proxy pattern: Caddy as a sidecar for TLS termination