hcengineering / hcengineering/huly-selfhost

Love does not work when using traefik

Open
#178 3 comments 0 reactions 1 assignee Claimed by @aonnikov View on GitHub
Dominant language
Shell
Stars
3.5k
Forks
469
PR merge metrics
No merged PRs in 30d

Description

As far as the documentation is not so detailed when using love container with traefik I created my docker compose like this:

```
x-common-env: &common-env
SERVER_SECRET: secret
SECRET: secret
STORAGE_CONFIG: minio|minio?accessKey=minioadmin&secretKey=secret
MONGO_URL: mongodb://ix-huly-mongodb-1:27017
DB_URL: mongodb://ix-huly-mongodb-1:27017
ACCOUNTS_URL: https://huly.example.com/accounts
STATS_URL: https://huly.example.com/stats
OPENID_CLIENT_ID: secret
OPENID_CLIENT_SECRET: secret
OPENID_ISSUER: https://authentik.example.com/application/o/huly/
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: ti4oaseG1dpKTvVpMl
FRONT_URL: https://huly.example.com
GITHUB_CLIENT_ID: secret
GITHUB_CLIENT_SECRET: secret
DISABLE_SIGNUP: true

services:
mongodb:
image: mongo:7-jammy
container_name: ix-huly-mongodb-1
restart: unless-stopped
environment:
<<: *common-env
PUID: 1000
PGID: 1000
volumes:
- /mnt/storage-1/databases/huly:/data/db
networks:
- internal-services

minio:
image: minio/minio
restart: unless-stopped
command: server /data --address ":9000" --console-address ":9001"
environment:
<<: *common-env
volumes:
- /mnt/storage-1/apps/huly/files:/data
networks:
- internal-services

elastic:
image: elasticsearch:7.14.2
restart: unless-stopped
command: |
/bin/sh -c "./bin/elasticsearch-plugin list | grep -q ingest-attachment || yes | ./bin/elasticsearch-plugin install --silent ingest-attachment;
/usr/local/bin/docker-entrypoint.sh eswrapper"
volumes:
- /mnt/storage-1/apps/huly/elastic:/usr/share/elasticsearch/data
environment:
<<: *common-env
ELASTICSEARCH_PORT_NUMBER: 9200
BITNAMI_DEBUG: true
discovery.type: single-node
ES_JAVA_OPTS: -Xms1024m -Xmx1024m
http.cors.enabled: true
http.cors.allow-origin: http://localhost:8082
healthcheck:
interval: 20s
retries: 10
test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'
networks:
- internal-services

rekoni:
image: hardcoreeng/rekoni-service:v0.6.501
restart: unless-stopped
environment:
<<: *common-env
deploy:
resources:
limits:
memory: 500M
networks:
- internal-services
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.rekoni.entrypoints=websecure"
- "traefik.http.services.rekoni.loadbalancer.server.port=4004"
- "traefik.http.routers.rekoni.rule=Host(`huly.example.com`) && PathPrefix(`/rekoni`)"
- "traefik.http.routers.rekoni.middlewares=rekoni-stripprefix"
- "traefik.http.middlewares.rekoni-stripprefix.stripprefix.prefixes=/rekoni"
- "traefik.http.routers.rekoni.tls=true"
- "traefik.http.routers.rekoni.tls.certresolver=cloudflare"

transactor:
image: hardcoreeng/transactor:v0.6.501
restart: unless-stopped
environment:
<<: *common-env
SERVER_PORT: 3333
SERVER_CURSOR_MAXTIMEMS: 30000
FULLTEXT_URL: http://ix-huly-fulltext-1:4700
LAST_NAME_FIRST: true
MAIL_URL: http://ix-huly-mail-1:8097
networks:
- internal-services
- traefik
labels:
- "traefik.enable=true"
# WebSocket route
- "traefik.http.routers.transactor-ws.entrypoints=websecure"
- "traefik.http.routers.transactor-ws.rule=Host(`huly.example.com`) && PathPrefix(`/ws/transactor`)"
- "traefik.http.routers.transactor-ws.tls=true"
- "traefik.http.routers.transactor-ws.tls.certresolver=cloudflare"
- "traefik.http.services.transactor-ws.loadbalancer.server.port=3333"
- "traefik.http.routers.transactor-ws.service=transactor-ws"

# Strip WebSocket prefix
- "traefik.http.routers.transactor-ws.middlewares=strip-transactor-ws-prefix"
- "traefik.http.middlewares.strip-transactor-ws-prefix.stripprefix.prefixes=/ws/transactor"

# HTTP route for non-WebSocket traffic
- "traefik.http.routers.transactor.entrypoints=websecure"
- "traefik.http.routers.transactor.rule=Host(`huly.example.com`) && PathPrefix(`/transactor`)"
- "traefik.http.routers.transactor.tls=true"
- "traefik.http.routers.transactor.tls.certresolver=cloudflare"
- "traefik.http.services.transactor.loadbalancer.server.port=3333"
- "traefik.http.routers.transactor.service=transactor"
# Strip HTTP prefix
- "traefik.http.routers.transactor.middlewares=strip-transactor-prefix"
- "traefik.http.middlewares.strip-transactor-prefix.stripprefix.prefixes=/transactor"

collaborator:
image: hardcoreeng/collaborator:v0.6.501
restart: unless-stopped
environment:
<<: *common-env
COLLABORATOR_PORT: 3078
networks:
- internal-services
- traefik
labels:
- "traefik.enable=true"
# WebSocket route
- "traefik.http.routers.collaborator-ws.entrypoints=websecure"
- "traefik.http.routers.collaborator-ws.rule=Host(`huly.example.com`) && PathPrefix(`/ws/collaborator`)"
- "traefik.http.routers.collaborator-ws.tls=true"
- "traefik.http.routers.collaborator-ws.tls.certresolver=cloudflare"
- "traefik.http.services.collaborator-ws.loadbalancer.server.port=3078"
- "traefik.http.routers.collaborator-ws.service=collaborator-ws"

# Strip WebSocket prefix
- "traefik.http.routers.collaborator-ws.middlewares=strip-collaborator-ws-prefix"
- "traefik.http.middlewares.strip-collaborator-ws-prefix.stripprefix.prefixes=/ws/collaborator"
# HTTP route for non-WebSocket traffic
- "traefik.http.routers.collaborator.entrypoints=websecure"
- "traefik.http.routers.collaborator.rule=Host(`huly.example.com`) && PathPrefix(`/collaborator`)"
- "traefik.http.routers.collaborator.tls=true"
- "traefik.http.routers.collaborator.tls.certresolver=cloudflare"
- "traefik.http.services.collaborator.loadbalancer.server.port=3078"

# Strip HTTP prefix
- "traefik.http.routers.collaborator.middlewares=strip-collaborator-prefix"
- "traefik.http.middlewares.strip-collaborator-prefix.stripprefix.prefixes=/collaborator"

account:
image: hardcoreeng/account:v0.6.501
restart: unless-stopped
environment:
<<: *common-env
SERVER_PORT: 3000
TRANSACTOR_URL: ws://ix-huly-transactor-1:3333;wss://huly.example.com/ws/transactor
MODEL_ENABLED: "*"
ACCOUNT_PORT: 3000
MAIL_URL: http://ix-huly-mail-1:8097
networks:
- internal-services
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.account.entrypoints=websecure"
- "traefik.http.services.account.loadbalancer.server.port=3000"
- "traefik.http.routers.account.rule=Host(`huly.example.com`) && PathPrefix(`/accounts`)"
- "traefik.http.routers.account.middlewares=account-stripprefix"
- "traefik.http.middlewares.account-stripprefix.stripprefix.prefixes=/accounts"
- "traefik.http.routers.account.tls=true"
- "traefik.http.routers.account.tls.certresolver=cloudflare"

workspace:
image: hardcoreeng/workspace:v0.6.501
restart: unless-stopped
environment:
<<: *common-env
TRANSACTOR_URL: ws://ix-huly-transactor-1:3333;wss://huly.example.com/ws/transactor
MODEL_ENABLED: "*"
networks:
- internal-services

front:
image: hardcoreeng/front:v0.6.501
restart: unless-stopped
labels:
traefik.enable: true
traefik.http.routers.huly.entrypoints: websecure
traefik.http.services.huly.loadbalancer.server.port: 8080
traefik.http.routers.huly.rule: Host(`huly.example.com`)
traefik.http.routers.huly.tls: true
traefik.http.routers.huly.tls.certresolver: cloudflare
environment:
<<: *common-env
SERVER_PORT: 8080
REKONI_URL: https://huly.example.com/rekoni
CALENDAR_URL: https://huly.example.com/_calendar
GMAIL_URL: https://huly.example.com/_gmail
TELEGRAM_URL: https://huly.example.com/_telegram
UPLOAD_URL: /files
ELASTIC_URL: http://ix-huly-elastic-1:9200
COLLABORATOR_URL: wss://huly.example.comws/collaborator
TITLE: Sustainjanes Project Management
DEFAULT_LANGUAGE: de
LAST_NAME_FIRST: false
DESKTOP_UPDATES_CHANNEL: selfhost
LIVEKIT_WS: wss://secret
LOVE_ENDPOINT: http://ix-huly-love-1:8096
GITHUB_CLIENT_ID: secret
GITHUB_CLIENT_SECRET: secret
networks:
- internal-services
- traefik

fulltext:
image: hardcoreeng/fulltext:v0.6.501
restart: unless-stopped
environment:
<<: *common-env
FULLTEXT_DB_URL: http://ix-huly-elastic-1:9200
ELASTIC_INDEX_NAME: huly_storage_index
REKONI_URL: http://ix-huly-rekoni-1:4004
networks:
- internal-services

stats:
image: hardcoreeng/stats:v0.6.501
restart: unless-stopped
environment:
<<: *common-env
PORT: 4900
networks:
- internal-services
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.stats.entrypoints=websecure"
- "traefik.http.services.stats.loadbalancer.server.port=4900"
- "traefik.http.routers.stats.rule=Host(`huly.example.com`) && PathPrefix(`/stats`)"
- "traefik.http.routers.stats.middlewares=stats-stripprefix"
- "traefik.http.middlewares.stats-stripprefix.stripprefix.prefixes=/stats"
- "traefik.http.routers.stats.tls=true"
- "traefik.http.routers.stats.tls.certresolver=cloudflare"

mail:
image: hardcoreeng/mail:v0.6.501
container_name: ix-huly-mail-1
# ports:
# - 8097:8097
environment:
<<: *common-env
PORT: 8097
SOURCE: example@gmx.de
SMTP_HOST: mail.example.net
SMTP_PORT: 587
SMTP_USERNAME: example@gmx.de
SMTP_PASSWORD: secret
networks:
- internal-services
restart: unless-stopped

love:
image: hardcoreeng/love:v0.6.501
container_name: ix-huly-love-1
networks:
- internal-services
- traefik
# ports:
# - 8096:8096
environment:
<<: *common-env
STORAGE_PROVIDER_NAME: ix-huly-minio-1
PORT: 8096
LIVEKIT_HOST: wss://huly-lzwdgu15.livekit.cloud
LIVEKIT_API_KEY: APIMzXo3Q9Tcspo
LIVEKIT_API_SECRET: QV2QE3rIDjiHwnA9fRAoctOS8K0FTgfmqldUzQf6VPLB
labels:
- "traefik.enable=true"
- "traefik.http.routers.love.entrypoints=websecure"
- "traefik.http.services.love.loadbalancer.server.port=3000"
- "traefik.http.routers.love.rule=Host(`huly.example.com`) && PathPrefix(`/love`)"
- "traefik.http.routers.love.tls=true"
- "traefik.http.routers.love.tls.certresolver=cloudflare"
restart: unless-stopped
networks:
internal-services:
name: internal-services
traefik:
external: true
```

But it seems like more steps are necessary to make this work, because it just cause endless loading:

https://github.com/user-attachments/assets/ee837e1d-e333-408a-b6e6-5612542434e7

If I can provide more information I will of course. Hope you can help me.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.