Skip to main content

Installing OpenProject with Docker Compose

Victoria Harbour, Hong Kong

Docker Compose

First, you must clone the OpenProject repository:

git clone --depth=1 --branch=stable/11 https://github.com/opf/openproject

Then, go into the OpenProject folder and you can launch all the services required by OpenProject with docker-compose:

docker-compose up -d

After some time, you will be able to access OpenProject on http://localhost:8080. The default username and password is login: admin, and password: admin.

You can stop the Compose stack by running:

docker-compose down

Docker-Compose File

version: "3.8"

networks:
frontend:
backend:

volumes:
pgdata:
opdata:

x-op-restart-policy: &restart_policy
restart: unless-stopped
x-op-image: &image
image: openproject/community:${TAG:-11}
x-op-app: &app
<<: *image
<<: *restart_policy
environment:
- "RAILS_CACHE_STORE=memcache"
- "OPENPROJECT_CACHE__MEMCACHE__SERVER=cache:11211"
- "OPENPROJECT_RAILS__RELATIVE__URL__ROOT=${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
- "DATABASE_URL=postgres://postgres:p4ssw0rd@db/openproject"
- "USE_PUMA=true"
# set to true to enable the email receiving feature. See ./docker/cron for more options
- "IMAP_ENABLED=false"
volumes:
- "opdata:/var/openproject/assets"

services:
db:
image: postgres:10
<<: *restart_policy
stop_grace_period: "3s"
volumes:
- "pgdata:/var/lib/postgresql/data"
environment:
- POSTGRES_PASSWORD=p4ssw0rd
- POSTGRES_DB=openproject
networks:
- backend

cache:
image: memcached
<<: *restart_policy
networks:
- backend

proxy:
<<: *image
<<: *restart_policy
command: "./docker/proxy"
ports:
- "6969:80"
environment:
- APP_HOST=web
- "OPENPROJECT_RAILS__RELATIVE__URL__ROOT=${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
depends_on:
- web
networks:
- frontend

web:
<<: *app
command: "./docker/web"
networks:
- frontend
- backend
depends_on:
- db
- cache
- seeder

worker:
<<: *app
command: "./docker/worker"
networks:
- backend
depends_on:
- db
- cache
- seeder

cron:
<<: *app
command: "./docker/cron"
networks:
- backend
depends_on:
- db
- cache
- seeder

seeder:
<<: *app
command: "./docker/seeder"
restart: on-failure
networks:
- backend