mirror of
https://github.com/opf/openproject-deploy.git
synced 2026-02-14 16:59:51 +00:00
Include and enable Hocuspocus (Collaboration Server) (#135)
* include hocuspocus and respective configuration * include defaults to hocuspocus setup * Update release version Co-authored-by: Kabiru Mwenja <makabby@gmail.com> * update readme with explicit info about secret & localhost --------- Co-authored-by: Kabiru Mwenja <makabby@gmail.com>
This commit is contained in:
@@ -17,3 +17,5 @@ RAILS_MIN_THREADS=4
|
||||
RAILS_MAX_THREADS=16
|
||||
PGDATA="/var/lib/postgresql/data"
|
||||
OPDATA="/var/openproject/assets"
|
||||
COLLABORATIVE_SERVER_URL=ws://localhost:8080/hocuspocus
|
||||
COLLABORATIVE_SERVER_SECRET=secret12345
|
||||
|
||||
12
README.md
12
README.md
@@ -57,6 +57,18 @@ If this happens during `docker 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, running `docker compose pull --ignore-buildable`.
|
||||
|
||||
### Collaboration server
|
||||
|
||||
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_SECRET` variable.
|
||||
|
||||
When running it in *localhost* it's necessary to make a few adjustments:
|
||||
|
||||
1. Either define a local alias (adding an entry to your hosts file) or setup HTTPS/SSL
|
||||
2. Define the `OPENPROJECT_HOST__NAME`, and the `COLLABORATIVE_SERVER_URL` in your .env file (you can look at .env.example for reference)
|
||||
3. Restart the containers
|
||||
|
||||
### HTTPS/SSL
|
||||
|
||||
By default OpenProject starts with the HTTPS option **enabled**, but it **does not** handle SSL termination itself. This
|
||||
|
||||
@@ -19,6 +19,8 @@ x-op-app: &app
|
||||
RAILS_CACHE_STORE: "memcache"
|
||||
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
||||
OPENPROJECT_COLLABORATIVE__EDITING__HOCUSPOCUS__URL: "${COLLABORATIVE_SERVER_URL:-wss://${OPENPROJECT_HOST__NAME}/hocuspocus}"
|
||||
OPENPROJECT_COLLABORATIVE__EDITING__HOCUSPOCUS__SECRET: "${COLLABORATIVE_SERVER_SECRET:-OVERRIDE_ME_PLEASE}"
|
||||
DATABASE_URL: "${DATABASE_URL:-postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicode&reconnect=true}"
|
||||
RAILS_MIN_THREADS: ${RAILS_MIN_THREADS:-4}
|
||||
RAILS_MAX_THREADS: ${RAILS_MAX_THREADS:-16}
|
||||
@@ -63,6 +65,7 @@ services:
|
||||
web:
|
||||
<<: *app
|
||||
command: "./docker/prod/web"
|
||||
hostname: "${OPENPROJECT_HOST__NAME:-localhost:8080}"
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
@@ -114,3 +117,12 @@ services:
|
||||
restart: on-failure
|
||||
networks:
|
||||
- backend
|
||||
|
||||
hocuspocus:
|
||||
image: openproject/hocuspocus:release-38128805
|
||||
environment:
|
||||
SECRET: ${COLLABORATIVE_SERVER_SECRET:-OVERRIDE_ME_PLEASE}
|
||||
networks:
|
||||
- backend
|
||||
- frontend
|
||||
<<: *restart_policy
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
:80 {
|
||||
reverse_proxy /hocuspocus* hocuspocus:1234
|
||||
|
||||
reverse_proxy * http://${APP_HOST}:8080 {
|
||||
# The following directives are needed to make the proxy forward explicitly the X-Forwarded-* headers. If unset,
|
||||
# Caddy will reset them. See: https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#defaults
|
||||
|
||||
Reference in New Issue
Block a user