mirror of
https://github.com/hcengineering/huly-selfhost.git
synced 2026-09-22 01:25:03 +02:00
243 lines
8.4 KiB
YAML
243 lines
8.4 KiB
YAML
services:
|
|
traefik:
|
|
restart: unless-stopped
|
|
image: "traefik:v2.10"
|
|
container_name: "traefik"
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "3333:3333"
|
|
- "3078:3078"
|
|
volumes:
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
- ./letsencrypt:/letsencrypt
|
|
networks:
|
|
- traefik-public
|
|
command:
|
|
- "--log.level=DEBUG" # set to INFO for production
|
|
- "--api.insecure=false"
|
|
- "--api.dashboard=true"
|
|
- "--global.sendAnonymousUsage=false"
|
|
- "--global.checkNewVersion=false"
|
|
- "--providers.docker=true"
|
|
- "--providers.docker.exposedbydefault=false"
|
|
- "--providers.docker.network=traefik-public"
|
|
- "--entrypoints.web.address=:80"
|
|
- "--entrypoints.websecure.address=:443"
|
|
- "--entrypoints.transactor.address=:3333" # for transactor wss
|
|
- "--entrypoints.collaborator.address=:3078" # for collaborator wss
|
|
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
|
|
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
|
|
- "--certificatesresolvers.myresolver.acme.email=admin@example.com"
|
|
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
|
|
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
|
|
- "--certificatesresolvers.myresolver.acme.caserver=http://acme-staging-v02.api.letsencrypt.org/directory" # For testing, comment out for production
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.traefik.rule=Host(`example.com`) && (PathPrefix(`/api`) || PathPrefix(`/traefik`))"
|
|
- "traefik.http.routers.traefik.service=api@internal"
|
|
- "traefik.http.routers.traefik.entrypoints=websecure"
|
|
# strip prefix for traefik dashboard
|
|
- "traefik.http.routers.traefik.middlewares=strip-prefix-traefik"
|
|
- "traefik.http.middlewares.strip-prefix-traefik.stripprefix.prefixes=/traefik"
|
|
- "traefik.http.routers.traefik.tls=true"
|
|
- "traefik.http.routers.traefik.tls.certresolver=myresolver"
|
|
|
|
mongodb:
|
|
image: "mongo:7-jammy"
|
|
container_name: mongodb
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
volumes:
|
|
- db:/data/db
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal-services
|
|
|
|
elastic:
|
|
image: "elasticsearch:7.14.2"
|
|
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:
|
|
- elastic:/usr/share/elasticsearch/data
|
|
environment:
|
|
- 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"'
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal-services
|
|
|
|
minio:
|
|
image: "minio/minio"
|
|
command: server /data --address ":9000" --console-address ":9001"
|
|
volumes:
|
|
- files:/data
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal-services
|
|
|
|
rekoni:
|
|
image: hardcoreeng/rekoni-service:v0.6.245
|
|
environment:
|
|
- SECRET=secret
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 500M
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal-services
|
|
- traefik-public
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.rekoni.entrypoints=websecure"
|
|
- "traefik.http.services.rekoni.loadbalancer.server.port=4004"
|
|
- "traefik.http.routers.rekoni.rule=Host(`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=myresolver"
|
|
|
|
transactor:
|
|
image: hardcoreeng/transactor:v0.6.245
|
|
environment:
|
|
- SERVER_PORT=3333
|
|
- SERVER_SECRET=secret
|
|
- SERVER_CURSOR_MAXTIMEMS=30000
|
|
- ELASTIC_URL=http://elastic:9200
|
|
- ELASTIC_INDEX_NAME=huly_storage_index
|
|
- MONGO_URL=mongodb://mongodb:27017
|
|
- METRICS_CONSOLE=false
|
|
- METRICS_FILE=metrics.txt
|
|
- MINIO_ENDPOINT=minio
|
|
- MINIO_ACCESS_KEY=minioadmin
|
|
- MINIO_SECRET_KEY=minioadmin
|
|
- REKONI_URL=http://rekoni:4004
|
|
- FRONT_URL=http://localhost:8087
|
|
- SERVER_PROVIDER=wss
|
|
- ACCOUNTS_URL=http://account:3000
|
|
- LAST_NAME_FIRST=true
|
|
- UPLOAD_URL=https://example.com/files
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal-services
|
|
- traefik-public
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.transactor.entrypoints=transactor"
|
|
- "traefik.http.routers.transactor.rule=Host(`example.com`)"
|
|
- "traefik.http.services.transactor.loadbalancer.server.port=3333"
|
|
- "traefik.http.routers.transactor.tls=true"
|
|
- "traefik.http.routers.transactor.tls.certresolver=myresolver"
|
|
|
|
|
|
collaborator:
|
|
image: hardcoreeng/collaborator:v0.6.245
|
|
environment:
|
|
- COLLABORATOR_PORT=3078
|
|
- SECRET=secret
|
|
- ACCOUNTS_URL=http://account:3000
|
|
- TRANSACTOR_URL=ws://transactor:3333
|
|
- UPLOAD_URL=/files
|
|
- MONGO_URL=mongodb://mongodb:27017
|
|
- MINIO_ENDPOINT=minio
|
|
- MINIO_ACCESS_KEY=minioadmin
|
|
- MINIO_SECRET_KEY=minioadmin
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal-services
|
|
- traefik-public
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.collaborator.entrypoints=collaborator"
|
|
- "traefik.http.services.collaborator.loadbalancer.server.port=3078"
|
|
- "traefik.http.routers.collaborator.rule=Host(`example.com`)"
|
|
- "traefik.http.routers.collaborator.tls=true"
|
|
- "traefik.http.routers.collaborator.tls.certresolver=myresolver"
|
|
|
|
account:
|
|
image: hardcoreeng/account:v0.6.245
|
|
environment:
|
|
- SERVER_PORT=3000
|
|
- SERVER_SECRET=secret
|
|
- MONGO_URL=mongodb://mongodb:27017
|
|
- TRANSACTOR_URL=ws://transactor:3333
|
|
- ENDPOINT_URL=wss://example.com:3333 # this is the transactor endpoint
|
|
- MINIO_ENDPOINT=minio
|
|
- MINIO_ACCESS_KEY=minioadmin
|
|
- MINIO_SECRET_KEY=minioadmin
|
|
- FRONT_URL=http://front:8080
|
|
- INIT_WORKSPACE=demo-tracker
|
|
- MODEL_ENABLED=*
|
|
- ACCOUNTS_URL=http://localhost:3000
|
|
- ACCOUNT_PORT=3000
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal-services
|
|
- traefik-public
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.account.entrypoints=websecure"
|
|
- "traefik.http.services.account.loadbalancer.server.port=3000"
|
|
- "traefik.http.routers.account.rule=Host(`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=myresolver"
|
|
|
|
front:
|
|
image: hardcoreeng/front:v0.6.245
|
|
environment:
|
|
- SERVER_PORT=8080
|
|
- SERVER_SECRET=secret
|
|
- ACCOUNTS_URL=https://example.com/accounts
|
|
- REKONI_URL=https://example.com/rekoni
|
|
- CALENDAR_URL=https://example.com:8095
|
|
- GMAIL_URL=https://example.com:8088
|
|
- TELEGRAM_URL=https://example.com:8086
|
|
- UPLOAD_URL=/files
|
|
- TRANSACTOR_URL=wss://example.com:3333
|
|
- ELASTIC_URL=http://elastic:9200
|
|
- COLLABORATOR_URL=wss://example.com:3078
|
|
- COLLABORATOR_API_URL=https://example.com:3078
|
|
- MINIO_ENDPOINT=minio
|
|
- MINIO_ACCESS_KEY=minioadmin
|
|
- MINIO_SECRET_KEY=minioadmin
|
|
- MONGO_URL=mongodb://mongodb:27017
|
|
- TITLE=Huly Self Host
|
|
- DEFAULT_LANGUAGE=en
|
|
- LAST_NAME_FIRST=true
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal-services
|
|
- traefik-public
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.front.entrypoints=websecure"
|
|
- "traefik.http.services.front.loadbalancer.server.port=8080"
|
|
- "traefik.http.routers.front.rule=Host(`example.com`)"
|
|
- "traefik.http.routers.front.tls=true"
|
|
- "traefik.http.routers.front.tls.certresolver=myresolver"
|
|
|
|
networks:
|
|
traefik-public:
|
|
name: traefik-public
|
|
internal-services:
|
|
name: internal-services
|
|
|
|
volumes:
|
|
db:
|
|
letsencrypt:
|
|
elastic:
|
|
files:
|