Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Error to connect #13

Open
ddiawara opened this issue Jun 9, 2024 · 1 comment
Open

Some Error to connect #13

ddiawara opened this issue Jun 9, 2024 · 1 comment

Comments

@ddiawara
Copy link

ddiawara commented Jun 9, 2024

I try to run selfhosted on docker swarm I cant connect to UI
below my compose swarm file where i use traefik.

version: "3"
services:
  mongodb:
    image: "mongo:7-jammy"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
    volumes:
      - huly_db:/data/db
    ports:
      - 27017:27017
    env_file:
      - .env
    deploy:
      restart_policy:
        condition: on-failure
    networks:
      - traefik_public

  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:
      - huly_elastic:/usr/share/elasticsearch/data
#    ports:
#      - 9200:9200
    environment:
      - ELASTICSEARCH_PORT_NUMBER=${ELASTICSEARCH_PORT_NUMBER}
      - 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"'
    env_file:
      - .env
    deploy:
      restart_policy:
        condition: on-failure
      labels:
        - traefik.enable=true
        - traefik.http.routers.elastic.rule=Host(`elastic.{{ domain_fullname }}`)
        - traefik.http.routers.elastic.entrypoints=websecure
        - traefik.http.routers.elastic.service=elastic
        - traefik.http.routers.elastic.tls.certresolver=cloudflare
        - traefik.http.services.elastic.loadbalancer.server.port=9200
    networks:
      - traefik_public

  account:
    image: hardcoreeng/account:${HULY_VERSION}
#    ports:
#      - 3000:3000
    environment:
      - SERVER_PORT=3000
      - SERVER_SECRET=${SERVER_SECRET}
      - MONGO_URL=mongodb://mongodb:27017
      - TRANSACTOR_URL=ws://transactor:3333
      - ENDPOINT_URL=ws://localhost:3333
      - MINIO_ENDPOINT=minio
      - MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
      - MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
      - FRONT_URL=http://front:8080
      - INIT_WORKSPACE=d3n
      - MODEL_ENABLED=*
      - ACCOUNTS_URL=http://localhost:3000
      - ACCOUNT_PORT=3000
      - STORAGE_CONFIG=${STORAGE_CONFIG}
    env_file:
      - .env
    deploy:
      restart_policy:
        condition: on-failure
    networks:
      - traefik_public

  rekoni:
    image: hardcoreeng/rekoni-service:${HULY_VERSION}
#    ports:
#      - 4004:4004
    environment:
      - SECRET=${SERVER_SECRET} #${SECRET}
    deploy:
      resources:
        limits:
          memory: 500M

  collaborator:
    image: hardcoreeng/collaborator:${HULY_VERSION}
#    ports:
#      - 3078:3078
    environment:
      - COLLABORATOR_PORT=3078
      - SECRET=${SERVER_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=${MINIO_ACCESS_KEY}
      - MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
      - STORAGE_CONFIG=${STORAGE_CONFIG}
    env_file:
      - .env
    deploy:
      restart_policy:
        condition: on-failure
    networks:
      - traefik_public

  transactor:
    image: hardcoreeng/transactor:${HULY_VERSION}
    ports:
      - "3333:3333"
    environment:
      - SERVER_PORT=3333
      - SERVER_SECRET=${SERVER_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=${MINIO_ACCESS_KEY}
      - MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
      - REKONI_URL=http://rekoni:4004
      - FRONT_URL=http://front:8080
      - SERVER_PROVIDER=ws
      - ACCOUNTS_URL=http://account:3000
      - LAST_NAME_FIRST=true
      - UPLOAD_URL=http://front:8080/files
      - STORAGE_CONFIG=${STORAGE_CONFIG}
    env_file:
      - .env
    deploy:
      restart_policy:
        condition: on-failure
    networks:
      - traefik_public

  front:
    image: hardcoreeng/front:${HULY_VERSION}
    #ports:
    #  - 8087:8080
    environment:
      - SERVER_PORT=8080
      - SERVER_SECRET=${SERVER_SECRET} #
      - ACCOUNTS_URL=http://account:3000 #http://${SERVER_ADDRESS}:3000
      - REKONI_URL=http://rekoni:4004 #http://${SERVER_ADDRESS}:4004
      - CALENDAR_URL=http://${SERVER_ADDRESS}:8095
      - GMAIL_URL=http://${SERVER_ADDRESS}:8088
      - TELEGRAM_URL=http://${SERVER_ADDRESS}:8086
      - UPLOAD_URL=/files
      - TRANSACTOR_URL=ws://transactor:3333 # ws://${SERVER_ADDRESS}:3333
      - ELASTIC_URL=http://elastic:9200
      - COLLABORATOR_URL=ws://collaborator:3078 # ws://${SERVER_ADDRESS}:3078
      - COLLABORATOR_API_URL=http://collaborator:3078 #http://${SERVER_ADDRESS}:3078 collaborator
      - MINIO_ENDPOINT=minio
      - MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
      - MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
      - MONGO_URL=mongodb://mongodb:27017
      - TITLE=Huly D3N Self Hosted
      - DEFAULT_LANGUAGE=en
      - LAST_NAME_FIRST=true
      - STORAGE_CONFIG=${STORAGE_CONFIG}
      #
      - LOGIN_ENDPOINT=ws://transactor:3333
    env_file:
      - .env
    deploy:
      restart_policy:
        condition: on-failure
      labels:
        - traefik.enable=true
        - traefik.http.routers.huly.rule=Host(`huly.{{ domain_fullname }}`)
        - traefik.http.routers.huly.entrypoints=websecure
        - traefik.http.routers.huly.service=huly
        - traefik.http.routers.huly.tls.certresolver=cloudflare
        - traefik.http.services.huly.loadbalancer.server.port=8080
    networks:
      - traefik_public

#  minio:
#    image: "minio/minio"
#    command: server /data --address ":9000" --console-address ":9001"
#    ports:
#      - 9000:9000
#      - 9001:9001
#    volumes:
#      - files:/data
#    restart: unless-stopped

networks:
  traefik_public:
    external: true

volumes:
  huly_db:
    external: true
  huly_elastic:
    external: true

image

@sypion
Copy link

sypion commented Jun 18, 2024

I believe we're both getting this issue because of the MongoDB container. From the container logs:

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see https://jira.mongodb.org/browse/SERVER-54407
  see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814

Anyone know of an alternative way around this? Could we use a different database like Postgres?

Update: I was trying to run Huly on a Proxmox VM and had to change the processor (Hardware > Edit Processors) to host which resolved the issue of the MongoDB container not starting. Still encountering this error though.

Update 2: Fixed this problem by ensuring the SERVER_ADDRESS in my .env file is not localhost and instead the private IP address of the machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants