- Notifications
You must be signed in to change notification settings - Fork276
opf/openproject-docker-compose
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains the installation method for OpenProject using Docker Compose.
Note
Looking for the Kubernetes installation method?Please use theOpenProject helm chart to install OpenProject on kubernetes.
First, you must clone theopenproject-docker-compose repository:
git clone https://github.com/opf/openproject-docker-compose.git --depth=1 --branch=stable/17 openproject
Copy the example.env file and edit any values you want to change:
cp .env.example .envvim .env
If you are using the default value of OPDATA that is used in the.env.example you need to make sure that the folder exist, and you have the right permissions:
sudo mkdir -p /var/openproject/assetssudo chown 1000:1000 -R /var/openproject/assets
Next you start up the containers in the background while making sure to pull the latest versions of all used images.
OPENPROJECT_HTTPS=false docker compose up -d --build --pull always
After a while, OpenProject should be up and running onhttp://localhost:8080. The default username and password is login:admin, and password:admin.TheOPENPROJECT_HTTPS=false environment variable explicitly disables HTTPS mode for the first startup. Without this, OpenProject assumes it's running behind HTTPS in production by default.We do strongly recommend you use OpenProject behind a TLS terminated proxy for production purposes and remove this flag before actually starting to use it.
Thedocker-compose.yml file present in the repository can be adjusted to your convenience. But note that with each pull, it will be overwritten.Best practice is to use the filedocker-compose.override.yml for that case.For instance you could mount specific configuration files, override environment variables, or switch off services you don't need.
Please refer to the officialDocker Compose documentation for more details.
pull access denied for openproject/proxy, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
If you encounter this afterdocker compose up this is merely a warning which can be ignored.
If this happens duringdocker compose pull this is simply a warning as well.But it will result in the command's exit code to be a failure even though all images are pulled.To prevent this you can add the--ignore-buildable option, runningdocker compose pull --ignore-buildable.
The collaboration server is enabled by default when setting up this application.
Important! Make sure to override the default secret by adjusting the docker-compose file or setting the
COLLABORATIVE_SERVER_SECRETvariable.
When running it inlocalhost it's necessary to make a few adjustments:
- Either define a local alias (adding an entry to your hosts file) or setup HTTPS/SSL
- Define the
OPENPROJECT_HOST__NAME, and theCOLLABORATIVE_SERVER_URLin your .env file (you can look at .env.example for reference) - Restart the containers
By default OpenProject starts with the HTTPS optionenabled, but itdoes not handle SSL termination itself. Thisis usually done separately via areverse proxysetup.Without this you will run into anERR_SSL_PROTOCOL_ERROR when accessing OpenProject.
See below how to disable HTTPS.
Be aware that if you want to use the integrated Caddy proxy as a proxy with outbound connections, you need to rewrite theCaddyfile. In the default state, it is configured to forward theX-Forwarded-* headers from the reverse proxy infront of it and not setting them itself. This is considered a security flaw and should instead be solved by configuringtrusted_proxies inside theCaddyfile. For more information readtheCaddy documentation.
By default the port is bound to0.0.0.0 means access to OpenProject will be public.See below how to change that.
OpenProject publishesslim containers that you should be using for this compose setup.Please seehttps://www.openproject.org/docs/installation-and-operations/installation/docker/#available-containers for more information on the containers and versions we push.
Environment variables can be added todocker-compose.yml underx-op-app -> environment to changeOpenProject's configuration. Some are already defined and can be changed via the environment.
You can pass those variables directly when starting the stack as follows.
VARIABLE=value docker-compose up -dYou can also put those variables into an.env file in your current workingdirectory, and Docker Compose will pick it up automatically. See.env.examplefor details.
You can disable OpenProject's HTTPS option via:
OPENPROJECT_HTTPS=falseIf you want to specify a different port, you can do so with:
PORT=4000If you don't want OpenProject to bind to0.0.0.0 you can bind it to localhost only like this:
PORT=127.0.0.1:8080If you want to specify a custom tag for the OpenProject docker image, you can do so with:
TAG=my-docker-tagIn order to install or change to BIM inside a Docker environment, please navigate to theDocker Installation for OpenProject BIM paragraph at the BIM edition documentation.
Retrieve any changes from theopenproject-docker-compose repository:
git pull origin stable/17Build the control plane:
docker-compose -f docker-compose.yml -f docker-compose.control.yml buildTake a backup of your existing postgresql data and openproject assets:
docker-compose -f docker-compose.yml -f docker-compose.control.yml run backupRun the upgrade:
docker-compose -f docker-compose.yml -f docker-compose.control.yml run upgradeRelaunch the containers, ensure you are pulling to use the latest version of the Docker images:
docker compose up -d --build --pull alwaysSwitch off your current installation:
docker-compose downBuild the control scripts:
docker-compose -f docker-compose.yml -f docker-compose.control.yml buildTake a backup of your existing PostgreSQL data and OpenProject assets:
docker-compose -f docker-compose.yml -f docker-compose.control.yml run backupRestart your OpenProject installation
docker-compose up -dIf you want to stop the containers without removing them directly:
docker-compose stop
You can remove the container stack with:
docker-compose down
Note
This will not remove your data which is persisted in named volumes, likely calledcompose_opdata (for attachments) andcompose_pgdata (for the database).The exact name depends on the name of the directory where yourdocker-compose.yml and/or youdocker-compose.override.yml files are stored (compose in this case).
If you want to start from scratch and remove the existing data you will have to remove these volumes viadocker volume rm compose_opdata compose_pgdata.
You can look at the logs with:
docker-compose logs -n 1000For the complete documentation, please refer tohttps://docs.openproject.org/installation-and-operations/.
If you're running into weird network issues and timeouts such as the one described inOP#42802, you might have success in remove the two separatefrontend and backend networks. This might be connected to using podman for orchestration, although we haven't been ableto confirm this.
Make sure your container has DNS resolution to access external SMTP server when set up as described inOP#44515.
worker:dns: -"Your DNS IP"# OR add a public DNS resolver like 8.8.8.8
About
Recipes to deploy OpenProject with Docker, Docker Compose, Kubernetes, etc.
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.