Open link in a new tab

Content

Expand project menu

OpenProject Docker Installation All-in-one container Does not keep data persistent

I installed the openproject using docker following the method All-in-one container as shown below

docker run -d -p 8080:80 \
  -e OPENPROJECT_SECRET_KEY_BASE=secret \
  -e OPENPROJECT_HOST__NAME=localhost:8080 \
  -e OPENPROJECT_HTTPS=false \
  openproject/community:12

However, when i stop the process, all the data that are saved in openproject are gone, and when i log in, it starts with a fresh slate.

On the other hand, if i try the "Using this container in production" method as shown below, i cannot create the container. The error would be /var/lib/openproject/pgdata is a read-only file system. 

I need advice from the community members whether have you encountered this problem before.

sudo mkdir -p /var/lib/openproject/{pgdata,assets} 

docker run -d -p 8080:80 --name openproject \
  -e OPENPROJECT_HOST__NAME=openproject.example.com \
  -e OPENPROJECT_SECRET_KEY_BASE=secret \
  -v /var/lib/openproject/pgdata:/var/openproject/pgdata \
  -v /var/lib/openproject/assets:/var/openproject/assets \
  openproject/community:12
Message actions

Hi James

if you run into some docker issues with read only filesystems then most likely your tries caused some leftovers in the docker containers.

Please start with a clean environment (purge your docker stuff, you find how to do that in the internet) after you found out what you want to use.

Why would you like to avoid the docker-compose solution? It is the recommended one for production

The 1 container is used for test reasons only.