From 826d8726cf200c39462f574cc2f3f93d81c007d0 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Sun, 8 Dec 2024 11:35:18 +0700 Subject: [PATCH 1/2] Update configs for v0.6.374 Signed-off-by: Alexander Onnikov --- nginx/setup.sh | 2 +- nginx/template-compose.yaml | 32 +++++++++++++++++++++++++------- setup.sh | 2 +- traefik/setup.sh | 2 +- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/nginx/setup.sh b/nginx/setup.sh index 33de132..72dd1dc 100755 --- a/nginx/setup.sh +++ b/nginx/setup.sh @@ -31,7 +31,7 @@ case "$NGINX_BEHIND_SSL" in esac -export HULY_VERSION="v0.6.333" +export HULY_VERSION="v0.6.374" export NGINX_SERVICE_PORT=$NGINX_SERVICE_PORT export NGINX_HTTP_SCHEME=$NGINX_HTTP_SCHEME export NGINX_WS_SCHEME=$NGINX_WS_SCHEME diff --git a/nginx/template-compose.yaml b/nginx/template-compose.yaml index e310469..12201fd 100644 --- a/nginx/template-compose.yaml +++ b/nginx/template-compose.yaml @@ -72,24 +72,20 @@ services: - SERVER_PORT=3333 - SERVER_SECRET=${HULY_SECRET} - SERVER_CURSOR_MAXTIMEMS=30000 - - ELASTIC_URL=http://elastic:9200 - - ELASTIC_INDEX_NAME=huly_storage_index - DB_URL=mongodb://mongodb:27017 - MONGO_URL=mongodb://mongodb:27017 - - METRICS_CONSOLE=false - - METRICS_FILE=metrics.txt - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - REKONI_URL=http://rekoni:4004 - FRONT_URL=http://localhost:8087 - ACCOUNTS_URL=http://account:3000 + - FULLTEXT_URL=http://fulltext:4700 - LAST_NAME_FIRST=true - - UPLOAD_URL=${NGINX_HTTP_SCHEME}://${SERVER_ADDRESS}/files + - STATS_URL=http://stats:4900 restart: unless-stopped networks: - internal-services - nginx-public - collaborator: image: hardcoreeng/collaborator:${HULY_VERSION} environment: @@ -98,6 +94,7 @@ services: - ACCOUNTS_URL=http://account:3000 - MONGO_URL=mongodb://mongodb:27017 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin + - STATS_URL=http://stats:4900 restart: unless-stopped networks: - internal-services @@ -115,6 +112,7 @@ services: - MODEL_ENABLED=* - ACCOUNTS_URL=http://localhost:3000 - ACCOUNT_PORT=3000 + - STATS_URL=http://stats:4900 restart: unless-stopped networks: - internal-services @@ -130,7 +128,7 @@ services: - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - MODEL_ENABLED=* - ACCOUNTS_URL=http://account:3000 - - NOTIFY_INBOX_ONLY=true + - STATS_URL=http://stats:4900 restart: unless-stopped networks: - internal-services @@ -154,11 +152,31 @@ services: - TITLE=Huly Self Host - DEFAULT_LANGUAGE=en - LAST_NAME_FIRST=true + - STATS_URL=http://stats:4900 restart: unless-stopped networks: - internal-services - nginx-public + fulltext: + image: hardcoreeng/fulltext:${HULY_VERSION} + environment: + - SERVER_SECRET=${HULY_SECRET} + - DB_URL=mongodb://mongodb:27017 + - FULLTEXT_DB_URL=http://elastic:9200 + - ELASTIC_INDEX_NAME=huly_storage_index + - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin + - REKONI_URL=http://rekoni:4004 + - ACCOUNTS_URL=http://account:3000 + - STATS_URL=http://stats:4900 + restart: unless-stopped + + stats: + image: hardcoreeng/stats:${HULY_VERSION} + environment: + - PORT=4900 + - SERVER_SECRET=${HULY_SECRET} + restart: unless-stopped networks: nginx-public: name: nginx-public diff --git a/setup.sh b/setup.sh index da7c18c..677f80d 100755 --- a/setup.sh +++ b/setup.sh @@ -7,4 +7,4 @@ echo "Setting Huly Server Address: $SERVER_ADDRESS" envsubst < template.conf > nginx.conf envsubst < template.env > .env -./use-version.sh v0.6.333 +./use-version.sh v0.6.374 diff --git a/traefik/setup.sh b/traefik/setup.sh index 9d2b593..cd61ded 100755 --- a/traefik/setup.sh +++ b/traefik/setup.sh @@ -14,7 +14,7 @@ if [ -z "$LETSENCRYPT_EMAIL" ]; then exit 1 fi -export HULY_VERSION="v0.6.333" +export HULY_VERSION="v0.6.374" export SERVER_ADDRESS=$DOMAIN_NAME export LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL From 1f4d3ca2815894cd358032675de7c0984c348b72 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Mon, 9 Dec 2024 17:40:38 +0700 Subject: [PATCH 2/2] Update self-host to Huly v377 Signed-off-by: Alexander Onnikov --- MIGRATION.md | 66 +++++++++++++++++++ kube/account/account-deployment.yaml | 20 ++---- .../collaborator/collaborator-deployment.yaml | 23 ++----- kube/config/config.yaml | 6 +- kube/config/secret.yaml | 3 +- kube/front/front-deployment.yaml | 25 ++----- kube/fulltext/fulltext-deployment.yaml | 59 +++++++++++++++++ kube/fulltext/fulltext-service.yaml | 12 ++++ kube/rekoni/rekoni-deployment.yaml | 2 +- kube/stats/stats-deployment.yaml | 35 ++++++++++ kube/stats/stats-ingress.yaml | 21 ++++++ kube/stats/stats-service.yaml | 12 ++++ kube/transactor/transactor-deployment.yaml | 34 ++-------- kube/workspace/workspace-deployment.yaml | 17 ++--- nginx/setup.sh | 2 +- nginx/template-compose.yaml | 7 +- setup.sh | 2 +- template.compose.yaml | 47 ++++++++++--- traefik/setup.sh | 3 +- traefik/template-compose.yaml | 63 +++++++++++++----- 20 files changed, 335 insertions(+), 124 deletions(-) create mode 100644 MIGRATION.md create mode 100644 kube/fulltext/fulltext-deployment.yaml create mode 100644 kube/fulltext/fulltext-service.yaml create mode 100644 kube/stats/stats-deployment.yaml create mode 100644 kube/stats/stats-ingress.yaml create mode 100644 kube/stats/stats-service.yaml diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 0000000..667ea9c --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,66 @@ +# Huly Migration + +## v0.6.377 + +### Fulltext Service + +Fulltext search functionality has been extracted into a separate `fulltext` service. This service is now required to be running in order to use the fulltext search functionality. + +Configuration: + +```yaml + fulltext: + image: hardcoreeng/fulltext:${HULY_VERSION} + ports: + - 4700:4700 + environment: + - SERVER_SECRET=${HULY_SECRET} + - DB_URL=mongodb://mongodb:27017 + - FULLTEXT_DB_URL=http://elastic:9200 + - ELASTIC_INDEX_NAME=huly_storage_index + - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin + - REKONI_URL=http://rekoni:4004 + - ACCOUNTS_URL=http://account:3000 + - STATS_URL=http://stats:4900 + restart: unless-stopped +``` + +Update the `transactor` service to use the new `fulltext` service: + +```yaml + transactor: + ... + environment: + ... + - FULLTEXT_URL=http://fulltext:4700 + # Remove the following lines + # - ELASTIC_URL=http://elastic:9200 + # - ELASTIC_INDEX_NAME=huly_storage_index + # - REKONI_URL=http://rekoni:4004 +``` + +### Statistics Service + +New statistics service has been added. The serivce is responsible for collecting and storing statistics about the usage of the application. + +Configuration: + +```yaml + stats: + image: hardcoreeng/stats:${HULY_VERSION} + ports: + - 4900:4900 + environment: + - PORT=4900 + - SERVER_SECRET=${HULY_SECRET} + restart: unless-stopped +``` + +Other Huly services have been updated to use the new statistics service: + +```yaml + ... + environment: + - STATS_URL=http://stats:4900 + ... +``` diff --git a/kube/account/account-deployment.yaml b/kube/account/account-deployment.yaml index d8f43ff..300add9 100644 --- a/kube/account/account-deployment.yaml +++ b/kube/account/account-deployment.yaml @@ -28,21 +28,13 @@ spec: configMapKeyRef: name: huly-config key: FRONT_URL - - name: MINIO_ACCESS_KEY + - name: STATS_URL + value: http://stats + - name: STORAGE_CONFIG valueFrom: secretKeyRef: name: huly-secret - key: MINIO_ACCESS_KEY - - name: MINIO_ENDPOINT - valueFrom: - configMapKeyRef: - name: huly-config - key: MINIO_ENDPOINT - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: huly-secret - key: MINIO_SECRET_KEY + key: STORAGE_CONFIG - name: MODEL_ENABLED value: '*' - name: DB_URL @@ -56,13 +48,11 @@ spec: name: huly-secret key: SERVER_SECRET - name: TRANSACTOR_URL - value: ws://transactor:3333;ws://localhost:3333 - - name: ENDPOINT_URL valueFrom: configMapKeyRef: name: huly-config key: TRANSACTOR_URL - image: hardcoreeng/account:latest + image: hardcoreeng/account:v0.6.377 name: account ports: - containerPort: 3000 diff --git a/kube/collaborator/collaborator-deployment.yaml b/kube/collaborator/collaborator-deployment.yaml index 360d04a..6012d80 100644 --- a/kube/collaborator/collaborator-deployment.yaml +++ b/kube/collaborator/collaborator-deployment.yaml @@ -18,34 +18,21 @@ spec: - env: - name: ACCOUNTS_URL value: http://account + - name: STATS_URL + value: http://stats - name: COLLABORATOR_PORT value: "3078" - - name: MINIO_ACCESS_KEY + - name: STORAGE_CONFIG valueFrom: secretKeyRef: name: huly-secret - key: MINIO_ACCESS_KEY - - name: MINIO_ENDPOINT - valueFrom: - configMapKeyRef: - name: huly-config - key: MINIO_ENDPOINT - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: huly-secret - key: MINIO_SECRET_KEY - - name: MONGO_URL - valueFrom: - configMapKeyRef: - name: huly-config - key: MONGO_URL + key: STORAGE_CONFIG - name: SECRET valueFrom: secretKeyRef: name: huly-secret key: SERVER_SECRET - image: hardcoreeng/collaborator:latest + image: hardcoreeng/collaborator:v0.6.377 name: collaborator ports: - containerPort: 3078 diff --git a/kube/config/config.yaml b/kube/config/config.yaml index 069c393..257e28d 100644 --- a/kube/config/config.yaml +++ b/kube/config/config.yaml @@ -5,11 +5,11 @@ metadata: data: ACCOUNTS_URL: 'http://account.huly.example/' COLLABORATOR_URL: 'ws://collaborator.huly.example/' - COLLABORATOR_API_URL: 'http://collaborator.huly.example/' FRONT_URL: 'http://huly.example' REKONI_URL: 'http://rekoni.huly.example/' - TRANSACTOR_URL: 'ws://transactor.huly.example/' + STATS_URL: 'http://stats.huly.example/' + TRANSACTOR_URL: 'ws://transactor;ws://transactor.huly.example/' MINIO_ENDPOINT: 'minio' MONGO_URL: 'mongodb://mongodb:27017' - ELASTIC_URL: 'http://elastic:9200/' + ELASTIC_URL: 'http://elastic:9200' ELASTIC_INDEX_NAME: 'huly_storage_index' diff --git a/kube/config/secret.yaml b/kube/config/secret.yaml index 406dd6f..596017c 100644 --- a/kube/config/secret.yaml +++ b/kube/config/secret.yaml @@ -4,6 +4,5 @@ metadata: name: huly-secret type: Opaque stringData: - MINIO_ACCESS_KEY: minioadmin - MINIO_SECRET_KEY: minioadmin SERVER_SECRET: secret + STORAGE_CONFIG: minio|minio?accessKey=minioadmin&secretKey=minioadmin diff --git a/kube/front/front-deployment.yaml b/kube/front/front-deployment.yaml index 7ceac45..39e901f 100644 --- a/kube/front/front-deployment.yaml +++ b/kube/front/front-deployment.yaml @@ -23,11 +23,6 @@ spec: key: ACCOUNTS_URL - name: CALENDAR_URL value: http://calendar - - name: COLLABORATOR_API_URL - valueFrom: - configMapKeyRef: - name: huly-config - key: COLLABORATOR_API_URL - name: COLLABORATOR_URL valueFrom: configMapKeyRef: @@ -42,21 +37,11 @@ spec: key: ELASTIC_URL - name: GMAIL_URL value: http://gmail:8088 - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: huly-secret - key: MINIO_ACCESS_KEY - - name: MINIO_ENDPOINT - valueFrom: - configMapKeyRef: - name: huly-config - key: MINIO_ENDPOINT - - name: MINIO_SECRET_KEY + - name: STORAGE_CONFIG valueFrom: secretKeyRef: name: huly-secret - key: MINIO_SECRET_KEY + key: STORAGE_CONFIG - name: MONGO_URL valueFrom: configMapKeyRef: @@ -80,7 +65,11 @@ spec: value: Huly Self Hosted - name: UPLOAD_URL value: /files - image: hardcoreeng/front:latest + - name: STATS_URL + value: http://stats + - name: DESKTOP_UPDATES_CHANNEL + value: selfhost + image: hardcoreeng/front:v0.6.377 name: front ports: - containerPort: 8080 diff --git a/kube/fulltext/fulltext-deployment.yaml b/kube/fulltext/fulltext-deployment.yaml new file mode 100644 index 0000000..15a06ff --- /dev/null +++ b/kube/fulltext/fulltext-deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: fulltext + name: fulltext +spec: + replicas: 1 + selector: + matchLabels: + app: fulltext + template: + metadata: + labels: + app: fulltext + spec: + containers: + - env: + - name: SERVER_SECRET + valueFrom: + secretKeyRef: + name: huly-secret + key: SERVER_SECRET + - name: DB_URL + valueFrom: + configMapKeyRef: + name: huly-config + key: MONGO_URL + - name: FULLTEXT_DB_URL + valueFrom: + configMapKeyRef: + name: huly-config + key: ELASTIC_URL + - name: ELASTIC_INDEX_NAME + valueFrom: + configMapKeyRef: + name: huly-config + key: ELASTIC_INDEX_NAME + - name: STORAGE_CONFIG + valueFrom: + secretKeyRef: + name: huly-secret + key: STORAGE_CONFIG + - name: REKONI_URL + value: http://rekoni + - name: ACCOUNTS_URL + value: http://account + - name: STATS_URL + value: http://stats + image: hardcoreeng/fulltext:v0.6.377 + name: fulltext + ports: + - containerPort: 4700 + hostPort: 4700 + protocol: TCP + resources: + limits: + memory: "512M" + restartPolicy: Always diff --git a/kube/fulltext/fulltext-service.yaml b/kube/fulltext/fulltext-service.yaml new file mode 100644 index 0000000..c05a877 --- /dev/null +++ b/kube/fulltext/fulltext-service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: fulltext + name: fulltext +spec: + ports: + - port: 80 + targetPort: 4700 + selector: + app: fulltext diff --git a/kube/rekoni/rekoni-deployment.yaml b/kube/rekoni/rekoni-deployment.yaml index 9c1ec9f..a8b5388 100644 --- a/kube/rekoni/rekoni-deployment.yaml +++ b/kube/rekoni/rekoni-deployment.yaml @@ -15,7 +15,7 @@ spec: app: rekoni spec: containers: - - image: hardcoreeng/rekoni-service:latest + - image: hardcoreeng/rekoni-service:v0.6.377 name: rekoni env: - name: SECRET diff --git a/kube/stats/stats-deployment.yaml b/kube/stats/stats-deployment.yaml new file mode 100644 index 0000000..2d2015f --- /dev/null +++ b/kube/stats/stats-deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: stats + name: stats +spec: + replicas: 1 + selector: + matchLabels: + app: stats + template: + metadata: + labels: + app: stats + spec: + containers: + - image: hardcoreeng/stats:v0.6.377 + name: stats + env: + - name: PORT + value: "4900" + - name: SERVER_SECRET + valueFrom: + secretKeyRef: + name: huly-secret + key: SERVER_SECRET + ports: + - containerPort: 4900 + hostPort: 4900 + protocol: TCP + resources: + limits: + memory: "500M" + restartPolicy: Always diff --git a/kube/stats/stats-ingress.yaml b/kube/stats/stats-ingress.yaml new file mode 100644 index 0000000..e7088fe --- /dev/null +++ b/kube/stats/stats-ingress.yaml @@ -0,0 +1,21 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + kubernetes.io/ingress.class: nginx + labels: + app: stats + name: stats +spec: + ingressClassName: nginx + rules: + - host: stats.huly.example + http: + paths: + - backend: + service: + name: stats + port: + number: 80 + path: / + pathType: Prefix diff --git a/kube/stats/stats-service.yaml b/kube/stats/stats-service.yaml new file mode 100644 index 0000000..28b321b --- /dev/null +++ b/kube/stats/stats-service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: stats + name: stats +spec: + ports: + - port: 80 + targetPort: 4900 + selector: + app: stats diff --git a/kube/transactor/transactor-deployment.yaml b/kube/transactor/transactor-deployment.yaml index 0651135..07f7711 100644 --- a/kube/transactor/transactor-deployment.yaml +++ b/kube/transactor/transactor-deployment.yaml @@ -18,36 +18,20 @@ spec: - env: - name: ACCOUNTS_URL value: http://account - - name: ELASTIC_INDEX_NAME - valueFrom: - configMapKeyRef: - name: huly-config - key: ELASTIC_INDEX_NAME - - name: ELASTIC_URL - valueFrom: - configMapKeyRef: - name: huly-config - key: ELASTIC_URL + - name: FULLTEXT_URL + value: http://fulltext - name: FRONT_URL valueFrom: configMapKeyRef: name: huly-config key: FRONT_URL - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: huly-secret - key: MINIO_ACCESS_KEY - - name: MINIO_ENDPOINT - valueFrom: - configMapKeyRef: - name: huly-config - key: MINIO_ENDPOINT - - name: MINIO_SECRET_KEY + - name: STATS_URL + value: http://stats + - name: STORAGE_CONFIG valueFrom: secretKeyRef: name: huly-secret - key: MINIO_SECRET_KEY + key: STORAGE_CONFIG - name: MONGO_URL valueFrom: configMapKeyRef: @@ -58,20 +42,16 @@ spec: configMapKeyRef: name: huly-config key: MONGO_URL - - name: REKONI_URL - value: http://rekoni - name: SERVER_CURSOR_MAXTIMEMS value: "30000" - name: SERVER_PORT value: "3333" - - name: SERVER_PROVIDER - value: ws - name: SERVER_SECRET valueFrom: secretKeyRef: name: huly-secret key: SERVER_SECRET - image: hardcoreeng/transactor:latest + image: hardcoreeng/transactor:v0.6.377 name: transactor ports: - containerPort: 3333 diff --git a/kube/workspace/workspace-deployment.yaml b/kube/workspace/workspace-deployment.yaml index 6083c1d..f710500 100644 --- a/kube/workspace/workspace-deployment.yaml +++ b/kube/workspace/workspace-deployment.yaml @@ -18,21 +18,18 @@ spec: - env: - name: ACCOUNTS_URL value: http://account - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: huly-secret - key: MINIO_ACCESS_KEY - - name: MINIO_ENDPOINT + - name: STATS_URL + value: http://stats + - name: TRANSACTOR_URL valueFrom: configMapKeyRef: name: huly-config - key: MINIO_ENDPOINT - - name: MINIO_SECRET_KEY + key: TRANSACTOR_URL + - name: STORAGE_CONFIG valueFrom: secretKeyRef: name: huly-secret - key: MINIO_SECRET_KEY + key: STORAGE_CONFIG - name: MODEL_ENABLED value: '*' - name: DB_URL @@ -50,7 +47,7 @@ spec: secretKeyRef: name: huly-secret key: SERVER_SECRET - image: hardcoreeng/workspace:latest + image: hardcoreeng/workspace:v0.6.377 name: workspace resources: limits: diff --git a/nginx/setup.sh b/nginx/setup.sh index 72dd1dc..8225081 100755 --- a/nginx/setup.sh +++ b/nginx/setup.sh @@ -31,7 +31,7 @@ case "$NGINX_BEHIND_SSL" in esac -export HULY_VERSION="v0.6.374" +export HULY_VERSION="v0.6.377" export NGINX_SERVICE_PORT=$NGINX_SERVICE_PORT export NGINX_HTTP_SCHEME=$NGINX_HTTP_SCHEME export NGINX_WS_SCHEME=$NGINX_WS_SCHEME diff --git a/nginx/template-compose.yaml b/nginx/template-compose.yaml index 12201fd..b3c6dda 100644 --- a/nginx/template-compose.yaml +++ b/nginx/template-compose.yaml @@ -75,7 +75,6 @@ services: - DB_URL=mongodb://mongodb:27017 - MONGO_URL=mongodb://mongodb:27017 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - - REKONI_URL=http://rekoni:4004 - FRONT_URL=http://localhost:8087 - ACCOUNTS_URL=http://account:3000 - FULLTEXT_URL=http://fulltext:4700 @@ -92,9 +91,8 @@ services: - COLLABORATOR_PORT=3078 - SECRET=${HULY_SECRET} - ACCOUNTS_URL=http://account:3000 - - MONGO_URL=mongodb://mongodb:27017 - - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - STATS_URL=http://stats:4900 + - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin restart: unless-stopped networks: - internal-services @@ -147,12 +145,13 @@ services: - UPLOAD_URL=/files - ELASTIC_URL=http://elastic:9200 - COLLABORATOR_URL=${NGINX_WS_SCHEME}://${SERVER_ADDRESS}/_collaborator + - STATS_URL=http://stats:4900 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - MONGO_URL=mongodb://mongodb:27017 - TITLE=Huly Self Host - DEFAULT_LANGUAGE=en - LAST_NAME_FIRST=true - - STATS_URL=http://stats:4900 + - DESKTOP_UPDATES_CHANNEL=selfhost restart: unless-stopped networks: - internal-services diff --git a/setup.sh b/setup.sh index 677f80d..8b53809 100755 --- a/setup.sh +++ b/setup.sh @@ -7,4 +7,4 @@ echo "Setting Huly Server Address: $SERVER_ADDRESS" envsubst < template.conf > nginx.conf envsubst < template.env > .env -./use-version.sh v0.6.374 +./use-version.sh v0.6.377 diff --git a/template.compose.yaml b/template.compose.yaml index fcce927..6933324 100644 --- a/template.compose.yaml +++ b/template.compose.yaml @@ -11,6 +11,7 @@ services: ports: - 27017:27017 restart: unless-stopped + minio: image: "minio/minio" command: server /data --address ":9000" --console-address ":9001" @@ -20,6 +21,7 @@ services: volumes: - files:/data restart: unless-stopped + elastic: image: "elasticsearch:7.14.2" command: | @@ -41,21 +43,23 @@ services: retries: 10 test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"' restart: unless-stopped + account: image: hardcoreeng/account:${HULY_VERSION} ports: - 3000:3000 environment: - - SERVER_PORT=3000 - SERVER_SECRET=${HULY_SECRET} - DB_URL=mongodb://mongodb:27017 - TRANSACTOR_URL=ws://transactor:3333;ws://${SERVER_ADDRESS}:3333 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - FRONT_URL=http://front:8080 + - STATS_URL=http://stats:4900 - MODEL_ENABLED=* - ACCOUNTS_URL=http://${SERVER_ADDRESS}:3000 - ACCOUNT_PORT=3000 restart: unless-stopped + workspace: image: hardcoreeng/workspace:${HULY_VERSION} environment: @@ -66,8 +70,9 @@ services: - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - MODEL_ENABLED=* - ACCOUNTS_URL=http://account:3000 - - NOTIFY_INBOX_ONLY=true + - STATS_URL=http://stats:4900 restart: unless-stopped + front: image: hardcoreeng/front:${HULY_VERSION} ports: @@ -83,12 +88,15 @@ services: - UPLOAD_URL=/files - ELASTIC_URL=http://elastic:9200 - COLLABORATOR_URL=ws://${SERVER_ADDRESS}:3078 + - STATS_URL=http://stats:4900 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - MONGO_URL=mongodb://mongodb:27017 - TITLE=Huly Self Hosted - DEFAULT_LANGUAGE=en - LAST_NAME_FIRST=true + - DESKTOP_UPDATES_CHANNEL=selfhost restart: unless-stopped + collaborator: image: hardcoreeng/collaborator:${HULY_VERSION} ports: @@ -97,9 +105,10 @@ services: - COLLABORATOR_PORT=3078 - SECRET=${HULY_SECRET} - ACCOUNTS_URL=http://account:3000 - - MONGO_URL=mongodb://mongodb:27017 + - STATS_URL=http://stats:4900 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin restart: unless-stopped + transactor: image: hardcoreeng/transactor:${HULY_VERSION} ports: @@ -108,18 +117,16 @@ services: - SERVER_PORT=3333 - SERVER_SECRET=${HULY_SECRET} - SERVER_CURSOR_MAXTIMEMS=30000 - - ELASTIC_URL=http://elastic:9200 - - ELASTIC_INDEX_NAME=huly_storage_index - DB_URL=mongodb://mongodb:27017 - MONGO_URL=mongodb://mongodb:27017 - - METRICS_CONSOLE=false - - METRICS_FILE=metrics.txt - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - - REKONI_URL=http://rekoni:4004 - FRONT_URL=http://${SERVER_ADDRESS}:8087 - ACCOUNTS_URL=http://account:3000 + - FULLTEXT_URL=http://fulltext:4700 + - STATS_URL=http://stats:4900 - LAST_NAME_FIRST=true restart: unless-stopped + rekoni: image: hardcoreeng/rekoni-service:${HULY_VERSION} ports: @@ -131,6 +138,30 @@ services: limits: memory: 500M restart: unless-stopped + + fulltext: + image: hardcoreeng/fulltext:${HULY_VERSION} + ports: + - 4700:4700 + environment: + - SERVER_SECRET=${HULY_SECRET} + - DB_URL=mongodb://mongodb:27017 + - FULLTEXT_DB_URL=http://elastic:9200 + - ELASTIC_INDEX_NAME=huly_storage_index + - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin + - REKONI_URL=http://rekoni:4004 + - ACCOUNTS_URL=http://account:3000 + - STATS_URL=http://stats:4900 + restart: unless-stopped + + stats: + image: hardcoreeng/stats:${HULY_VERSION} + ports: + - 4900:4900 + environment: + - PORT=4900 + - SERVER_SECRET=${HULY_SECRET} + restart: unless-stopped volumes: db: files: diff --git a/traefik/setup.sh b/traefik/setup.sh index cd61ded..94c24ac 100755 --- a/traefik/setup.sh +++ b/traefik/setup.sh @@ -14,7 +14,8 @@ if [ -z "$LETSENCRYPT_EMAIL" ]; then exit 1 fi -export HULY_VERSION="v0.6.374" +export HULY_VERSION="v0.6.377" +export HULY_SECRET="secret" export SERVER_ADDRESS=$DOMAIN_NAME export LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL diff --git a/traefik/template-compose.yaml b/traefik/template-compose.yaml index a556bb6..7f36621 100644 --- a/traefik/template-compose.yaml +++ b/traefik/template-compose.yaml @@ -89,7 +89,7 @@ services: rekoni: image: hardcoreeng/rekoni-service:${HULY_VERSION} environment: - - SECRET=secret + - SECRET=${HULY_SECRET} deploy: resources: limits: @@ -112,18 +112,15 @@ services: image: hardcoreeng/transactor:${HULY_VERSION} environment: - SERVER_PORT=3333 - - SERVER_SECRET=secret + - SERVER_SECRET=${HULY_SECRET} - SERVER_CURSOR_MAXTIMEMS=30000 - - ELASTIC_URL=http://elastic:9200 - - ELASTIC_INDEX_NAME=huly_storage_index - DB_URL=mongodb://mongodb:27017 - MONGO_URL=mongodb://mongodb:27017 - - METRICS_CONSOLE=false - - METRICS_FILE=metrics.txt - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - - REKONI_URL=http://rekoni:4004 - FRONT_URL=http://localhost:8087 - ACCOUNTS_URL=http://account:3000 + - FULLTEXT_URL=http://fulltext:4700 + - STATS_URL=http://stats:4900 - LAST_NAME_FIRST=true restart: unless-stopped networks: @@ -141,9 +138,9 @@ services: image: hardcoreeng/collaborator:${HULY_VERSION} environment: - COLLABORATOR_PORT=3078 - - SECRET=secret + - SECRET=${HULY_SECRET} - ACCOUNTS_URL=http://account:3000 - - MONGO_URL=mongodb://mongodb:27017 + - STATS_URL=http://stats:4900 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin restart: unless-stopped networks: @@ -161,14 +158,14 @@ services: image: hardcoreeng/account:${HULY_VERSION} environment: - SERVER_PORT=3000 - - SERVER_SECRET=secret + - SERVER_SECRET=${HULY_SECRET} - DB_URL=mongodb://mongodb:27017 - TRANSACTOR_URL=ws://transactor:3333;wss://${SERVER_ADDRESS}:3333 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - FRONT_URL=http://front:8080 - - INIT_WORKSPACE=demo-tracker + - STATS_URL=http://stats:4900 - MODEL_ENABLED=* - - ACCOUNTS_URL=http://localhost:3000 + - ACCOUNTS_URL=http://account:3000 - ACCOUNT_PORT=3000 restart: unless-stopped networks: @@ -187,14 +184,14 @@ services: workspace: image: hardcoreeng/workspace:${HULY_VERSION} environment: - - SERVER_SECRET=secret + - SERVER_SECRET=${HULY_SECRET} - DB_URL=mongodb://mongodb:27017 - MONGO_URL=mongodb://mongodb:27017 - TRANSACTOR_URL=ws://transactor:3333;wss://${SERVER_ADDRESS}:3333 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - MODEL_ENABLED=* - ACCOUNTS_URL=http://account:3000 - - NOTIFY_INBOX_ONLY=true + - STATS_URL=http://stats:4900 restart: unless-stopped networks: - internal-services @@ -203,12 +200,13 @@ services: image: hardcoreeng/front:${HULY_VERSION} environment: - SERVER_PORT=8080 - - SERVER_SECRET=secret + - SERVER_SECRET=${HULY_SECRET} - ACCOUNTS_URL=https://${SERVER_ADDRESS}/accounts - REKONI_URL=https://${SERVER_ADDRESS}/rekoni - CALENDAR_URL=https://${SERVER_ADDRESS}:8095 - GMAIL_URL=https://${SERVER_ADDRESS}:8088 - TELEGRAM_URL=https://${SERVER_ADDRESS}:8086 + - STATS_URL=https://${SERVER_ADDRESS}/stats - UPLOAD_URL=/files - ELASTIC_URL=http://elastic:9200 - COLLABORATOR_URL=wss://${SERVER_ADDRESS}:3078 @@ -217,6 +215,7 @@ services: - TITLE=Huly Self Host - DEFAULT_LANGUAGE=en - LAST_NAME_FIRST=true + - DESKTOP_UPDATES_CHANNEL=selfhost restart: unless-stopped networks: - internal-services @@ -230,6 +229,40 @@ services: - "traefik.http.routers.front.tls=true" - "traefik.http.routers.front.tls.certresolver=myresolver" + fulltext: + image: hardcoreeng/fulltext:${HULY_VERSION} + environment: + - SERVER_SECRET=${HULY_SECRET} + - DB_URL=mongodb://mongodb:27017 + - FULLTEXT_DB_URL=http://elastic:9200 + - ELASTIC_INDEX_NAME=huly_storage_index + - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin + - REKONI_URL=http://rekoni:4004 + - ACCOUNTS_URL=http://account:3000 + - STATS_URL=http://stats:4900 + restart: unless-stopped + networks: + - internal-services + + stats: + image: hardcoreeng/stats:${HULY_VERSION} + environment: + - PORT=4900 + - SERVER_SECRET=${HULY_SECRET} + restart: unless-stopped + networks: + - internal-services + - traefik-public + labels: + - "traefik.enable=true" + - "traefik.http.routers.stats.entrypoints=websecure" + - "traefik.http.services.stats.loadbalancer.server.port=4900" + - "traefik.http.routers.stats.rule=Host(`${SERVER_ADDRESS}`) && 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=myresolver" + networks: traefik-public: name: traefik-public