Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Improve Docker TLS setup & docs (#13045)

Yulee86928fdb7e4
diff --git a/docker/dev/tls/docker-compose.override.example.yml b/docker/dev/tls/docker-compose.override.example.yml
index 707374000d0..18b7aa9bbd4 100644
--- a/docker/dev/tls/docker-compose.override.example.yml
+++ b/docker/dev/tls/docker-compose.override.example.yml
@@ -3,8 +3,11 @@ services:
volumes:
# Linux: mount the certificate bundle
- /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
-
- step:
- # add any host here run in a docker service, that need a TLS certificate
- extra_hosts:
- - "openproject.local:host-gateway"
+ networks:
+ external:
+ aliases:
+ # Traefik is aliased to all the services that run behind it here.
+ # The reason to do this is that step-ca tries to validate the domains
+ # by connecting to them, and we'd like it to go through traefik, instead
+ # of calling the service containers directly.
+ - openproject.local
diff --git a/docker/dev/tls/docker-compose.yml b/docker/dev/tls/docker-compose.yml
index daefba584e9..2375e9ba3b2 100644
--- a/docker/dev/tls/docker-compose.yml
+++ b/docker/dev/tls/docker-compose.yml
@@ -28,10 +28,6 @@ services:
depends_on:
step:
condition: service_healthy
- logging:
- options:
- max-size: "8m"
- max-file: "10"
networks:
external:
aliases:
@@ -49,10 +45,6 @@ services:
step:
image: smallstep/step-ca:latest
restart: unless-stopped
- logging:
- options:
- max-size: "8m"
- max-file: "10"
environment:
- TZ=UTC
- DOCKER_STEPCA_INIT_NAME=OpenProject Development
diff --git a/docs/development/development-environment-docker/README.md b/docs/development/development-environment-docker/README.md
index a0efe6daee3..dbdd00f5f4d 100644
--- a/docs/development/development-environment-docker/README.md
+++ b/docs/development/development-environment-docker/README.md
@@ -218,6 +218,11 @@ As an overview, you need to take the following, additional steps:
2. Extract created root certificate and install it into system and browsers
3. Amend docker containers with labels for proxy
+At the end you will be running two separate docker-compose stacks:
+
+1. the normal stack in the root of the repository, and
+2. the stack defined in `docker/dev/tls` that runs the CA and reverse proxy.
+
If the setup is successful, you will be able to access the local OpenProject application
under `https://openproject.local`. Of course, the host name is replaceable.
@@ -385,6 +390,16 @@ After amending the override file and the `.env`, ensure that you restart the sta
docker compose up -d frontend
```
+### Adding a new service
+
+Some development tasks require you to run separate services that interact with OpenProject. For example, you might want
+to have Nextcloud running to test the Nextcloud-OpenProject integration. To do this, you'll need to follow some steps:
+
+1. Add the Nextcloud service to your `docker-compose.override.yml`, with the appropriate traefik labels, network, and
+ ca-bundle mounted.
+2. Make sure step-ca can reach it to validate it for SSH. In `docker/dev/tls/docker-compose.override.yml`, add the host
+ to the `aliases` section of the traefik networking.
+
### Troubleshooting
After this setup you should be able to access your OpenProject development instance at `https://openproject.local`. If