Skip to content

Openproject

Container image

Unfortunatly, docker images don't have the openproject repo checked out as git but as a release snapshot.

Test it:

docker run -d -p 8080:80 -e SECRET_KEY_BASE=secret openproject/community:8.1

Configuration

This is done via env vars. See possible options at: https://github.com/opf/openproject/blob/dev/docs/configuration/configuration.md#list-of-options

Interesting:

  • hidden_menu_items
  • disabled_modules

Restore DB

i.e. when migration from a different installation to a docker based one.

docker cp /var/lib/postgresql/restore/openproject-2018-11-30-11\:39\:01.dump  openproject:/tmp
docker exec -it openproject bash

Stop processes that access postgres db:

  supervisorctl
    stop apache2 web worker cron
    exit

Remove, recreate and restore db:

  su - postgres
  psql
    DROP DATABASE openproject;
    CREATE DATABASE openproject;
  pg_restore -d openproject /tmp/openproject-2018-11-30-11\:39\:01.dump

Restart container:

docker stop openproject
docker start openproject

Watch container/migration logs:

docker logs -f openproject
tail -F  /var/lib/openproject_docker/logs/*

Docker compose examples

API

Example API call:

function op-api () { curl -u "apikey:$OP_API_KEY" https://openproject.example.org/api/v3/$1 }
op-api users

Components

Wiki

  • Option to export the wiki page as Markdown using the path /projects/it/wiki/ansible.markdown?version=123

openproject_wiki_api

  • GitHub
  • REST API for OpenProject wiki pages: list, read, create, update, journals, diff, attachments
  • Native OpenProject wiki-pages API endpoint doesn't provide an option to list all wiki page IDs. It can only get a single wiki_page specified by an ID.

Installation in a docker container

Work packages

  • API endpoint
  • List all projects: /projects
  • List first 20 work packages in a project (paginated): workspaces/<project id>/work_packages
  • List all work packages in a project (unpaginated): workspaces/<project id>/work_packages?pageSize=9999
  • Get a work package: work_packages/<work package id>