opf / opf/openproject-docker-compose
Migrating from an all-in-one to a docker compose installation
@tiroessler is already working on this.
Since Feb 20, 2025.
- Dominant language
- Shell
- Stars
- 342
- Forks
- 315
- PR merge metrics
- No merged PRs in 30d
Description
I have been using local instance of OpenProject on my windows machine which I installed using the all-in-one configuration. The Dockerfile for the image I'm using contains the following:
FROM openproject/openproject:15
ENV OPENPROJECT_SECRET_KEY_BASE=resing123
ENV OPENPROJECT_HOST__NAME=localhost:8080
ENV OPENPROJECT_HTTPS=false
ENV OPENPROJECT_DEFAULT__LANGUAGE=en
I then build and run as follows:
PS > docker build .
PS> docker run -it -p 8080:80 -v $TEMP/openproject/pgdata:/var/openproject/pgdata -v $TEMP/openproject/assets:/var/openproject/assets openproject-all-in-one:latest
After using this open project instance for a while, I am now attempting to migrate to the Docker Compose installation. I cloned the repo and copied the .env.example file as indicated by the docs.
PS> git clone https://github.com/opf/openproject-deploy --depth=1 --branch=stable/15 openproject
PS> cp .env.example .env
I then tried tweaking the .env file to mimic the environment I had with the all-in-one installation, including mapping the volumes to the same directories where the all-in-one installation was storing data.
TAG=15-slim
OPENPROJECT_HTTPS=false
OPENPROJECT_HOST__NAME=localhost
PORT=127.0.0.1:8080
IMAP_ENABLED=false
DATABASE_URL="postgres://openproject:openproject@127.0.0.1/openproject"
OPENPROJECT_SECRET_KEY_BASE=resing123
RAILS_MIN_THREADS=4
RAILS_MAX_THREADS=16
PGDATA="C:/Users/admin/Desktop/TEMP/openproject/pgdata"
OPDATA="C:/Users/admin/Desktop/TEMP/openproject/assets"
POSTGRES_PASSWORD=""
# All-in-one connection string:\
# postgres://openproject:openproject@127.0.0.1/openproject
DATABASE_URL="postgres://openproject:openproject@db/openproject?pool=20&encoding=unicode&reconnect=true"
Unfortunately, when I try to docker compose up the above, I observe the following behaviors:
- the
seederservice keeps on exiting with exit code 2 and restarting over and over again - The
web-1service throws errors that look like this:
| /app/vendor/bundle/ruby/3.3.0/gems/pg-1.5.9/lib/pg/connection.rb:709:in `async_connect_or_reset': connection to server at "172.18.0.4", port 5432 failed: Connection refused (PG::ConnectionBad)
- The
worker-1service throws errors that look like this:
| /app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/postgresql_adapter.rb:80:in `rescue in new_client': connection to server at "172.18.0.4", port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
| Is the server running on that host and accepting TCP/IP connections?
Being a bit of a noob when it comes to Docker, I would appreciate some help or pointers on what I may be doing wrong. Thanks in advance.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.