Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Docker related installation problems

Docker related installation problems

Added by Ovidiu Pacuraru about 7 years ago

I am not new to Docker, nor am I an expert but I am currently not able to figure out what I am doing wrong.

The Docker image I am using is the official one from here: https://hub.docker.com/r/openproject/community/ and I have followed those “Quick Start” instructions.

here is what I have done so far:

  1. openproject is running on a docker host within my internal LAN at work and is not reachable from the outside, same goes for the email server indicated in the options below
  2. docker run -d —name openproject -p 8081:80 -v /mnt/openproject-data:/var/db/openproject -v /mnt/openproject-db:/var/lib/postgresql/9.4/main -e SECRET_KEY_BASE=mysecret -e SMTP_ADDRESS=192.168.220.2 -e SMTP_PORT=25 -e SMTP_DOMAIN=mydomain.tld openproject/community:7
  3. I can now access openproject via my docker-host:8081
  4. I log in as admin:admin and do the mandatory password change
  5. I change some configurations inside the openproject system settings
  6. I now realized I made some errors with my first docker installation so I stop, remove and start my container again
  7. docker stop openproject
  8. docker rm openproject
  9. docker run -d —name openproject -p 8081:80 -v /mnt/openproject-data:/var/db/openproject -v /mnt/openproject-db:/var/lib/postgresql/9.4/main -e SECRET_KEY_BASE=mysecret -e SMTP_ADDRESS=192.168.220.2 -e SMTP_PORT=25 -e SMTP_DOMAIN=mydomain.tld openproject/community:7
  10. I go to docker-host:8081 and find out that my new password doesn’t work and has reverted to admin:admin and all the changes to system settings I made before are lost

I am unable to figure out what I did wrong, the whole purpose of the two "v" options above was to keep persistent settings :(
-v /mnt/openproject-data:/var/db/openproject -v /mnt/openproject-db:/var/lib/postgresql/9.4/main

The indicated folders both exist and are empty. After running my container /mnt/openproject-data now has a subfolder called files but /mnt/openproject/db is still empty.

Any hints on what I am doing wrong? I don’t want to go ahead and set openproject up properly only to lose all my settings with the next update.

After some debugging, I think I might have found the problem in the logs:

-----> Database cluster not found. Creating a new one in /var/lib/postgresql/9.6/main...
Apparently the Docker iamge does no longer run postgresql 9.4 but 9.6

I am now trying to start the container like this: docker run -d —name openproject -p 8081:80 -v /mnt/openproject-data:/var/db/openproject -v /mnt/openproject-db:/var/lib/postgresql -e SECRET_KEY_BASE=mysecret -e SMTP_ADDRESS=192.168.220.2 -e SMTP_PORT=25 -e SMTP_DOMAIN=mydomain.tld —restart=unless-stopped openproject/community:7

There are no more errors in the docker container logs which I can see:
-----> Database cluster not found. Creating a new one in /var/lib/postgresql/9.6/main... The files belonging to this database system will be owned by user "postgres". This user must also own the server process.
and still the folder /mnt/openproject-db/ only contains the subfolder 9.6 with a subfolder named main which is also empty so where is my persistent DB?


Replies (2)

RE: Docker related installation problems - Added by Ovidiu Pacuraru about 7 years ago

I have found newer installation instructions here: https://www.openproject.org/docker/

My current docker run string looks like this:

@ docker run -d —name openproject -p 8081:80 -v /mnt/openproject/pgdata:/var/lib/postgresql -v /mnt/openproject/logs:/var/log/supervisor -v /mnt/openproject/static:/var/db/openproject -e SECRET_KEY_BASE=mysecret -e SMTP_ADDRESS=192.168.220.2 -e SMTP_PORT=25 -e SMTP_DOMAIN=mydomain.tld —restart=unless-stopped openproject/community:7@

and still the /mnt/openproject/pgdata/9.6/main folder remains empty.

RE: Docker related installation problems - Added by Ovidiu Pacuraru about 7 years ago

OK, figured it out.

You cannot use:
-v /mnt/openproject/pgdata:/var/lib/postgresql

This works:
-v /mnt/openproject/pgdata:/var/lib/postgresql/9.6/main

However to me this looks like when a newer Docker image will use another Postgresql version one might need to adapt

  • (1 - 2/2)
Loading...