mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Get Hocuspocus real time collaboration server into pullpreview (#20924)
Integrate hocuspocus with pullpreview
This commit is contained in:
committed by
GitHub
parent
e1cf4e79ce
commit
cf8a307a9c
@@ -44,6 +44,7 @@ jobs:
|
||||
- name: Prepare docker-compose files
|
||||
run: |
|
||||
cp ./docker/pullpreview/docker-compose.yml ./docker-compose.pullpreview.yml
|
||||
cp ./docker/pullpreview/Caddyfile ./Caddyfile
|
||||
cp ./docker/prod/Dockerfile ./Dockerfile
|
||||
- uses: pullpreview/action@v6
|
||||
with:
|
||||
@@ -54,7 +55,8 @@ jobs:
|
||||
instance_type: xlarge
|
||||
ports: 80,443,8080
|
||||
default_port: 443
|
||||
ttl: 10d
|
||||
ttl: 8d
|
||||
dns: my.opf.run
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
|
||||
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{$PULLPREVIEW_PUBLIC_DNS} {
|
||||
# Websocket proxy for hocuspocus
|
||||
reverse_proxy /hocuspocus hocuspocus:1234
|
||||
reverse_proxy web:8080
|
||||
}
|
||||
@@ -23,6 +23,9 @@ x-defaults: &defaults
|
||||
environment:
|
||||
- "DATABASE_URL=postgresql://app:p4ssw0rd@db:5432/app?encoding=utf8&pool=5&timeout=5000&reconnect=true"
|
||||
- "OPENPROJECT_RAILS__CACHE__STORE=file_store"
|
||||
- "OPENPROJECT_COLLABORATIVE__EDITING__HOCUSPOCUS__URL=wss://${PULLPREVIEW_PUBLIC_DNS}/hocuspocus"
|
||||
- "OPENPROJECT_COLLABORATIVE__EDITING__HOCUSPOCUS__SECRET=secret12345"
|
||||
- "OPENPROJECT_ADDITIONAL__HOSTS=web"
|
||||
- "RAILS_ENV=production"
|
||||
- "SECRET_KEY_BASE=d4e74f017910ac56c6ebad01165b7e1b37f4c9c02e9716836f8670cdc8d65a231e64e4f6416b19c8"
|
||||
networks:
|
||||
@@ -32,17 +35,21 @@ services:
|
||||
proxy:
|
||||
image: caddy:2
|
||||
restart: unless-stopped
|
||||
command: "caddy reverse-proxy --from '${PULLPREVIEW_URL}' --to web:8080"
|
||||
command: "caddy run --config /etc/caddy/Caddyfile"
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
depends_on:
|
||||
- web
|
||||
- hocuspocus
|
||||
environment:
|
||||
- "PULLPREVIEW_PUBLIC_DNS=${PULLPREVIEW_PUBLIC_DNS}"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "caddy_data:/data"
|
||||
- "./Caddyfile:/etc/caddy/Caddyfile:ro"
|
||||
|
||||
db:
|
||||
image: postgres:17
|
||||
@@ -71,3 +78,17 @@ services:
|
||||
command: "./docker/prod/worker --seed --set attachment_max_size=262144,host_name=${PULLPREVIEW_PUBLIC_DNS}"
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
hocuspocus:
|
||||
image: openproject/hocuspocus:latest
|
||||
depends_on:
|
||||
- web
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
environment:
|
||||
- NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
- SECRET=secret12345
|
||||
- OPENPROJECT_URL=http://web:8080
|
||||
expose:
|
||||
- "1234"
|
||||
|
||||
Reference in New Issue
Block a user