plane icon indicating copy to clipboard operation
plane copied to clipboard

[bug]: DO NOT LOG IN OR REGISTER

Open tykocompany opened this issue 1 year ago • 7 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current behavior

I deployed the stack to Portainer using Docker Swarm and Traefik to do the reverse proxy. It deployed normally, but when I try to log in, absolutely nothing happens. It's like it's just a static screen, I've tried everything and I haven't been able to resolve it.

I left the file I used to deploy the stack as an attachment.

Steps to reproduce

version: "3.7"

x-app-env: &app-env environment: - WEB_URL=${WEB_URL:-https://plane.mydomain.com} - DEBUG=${DEBUG:-0} - SENTRY_DSN=${SENTRY_DSN} - SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT:-"production"} - CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS} # Gunicorn Workers - GUNICORN_WORKERS=${GUNICORN_WORKERS:-1} # DB SETTINGS - PGHOST=${PGHOST:-plane-db} - PGDATABASE=${PGDATABASE:-plane} - POSTGRES_USER=${POSTGRES_USER:-plane} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-plane} - POSTGRES_DB=${POSTGRES_DB:-plane} - POSTGRES_PORT=${POSTGRES_PORT:-5432} - PGDATA=${PGDATA:-/var/lib/postgresql/data} - DATABASE_URL=${DATABASE_URL:-postgresql://plane:plane@plane-db/plane} # REDIS SETTINGS - REDIS_HOST=${REDIS_HOST:-plane-redis} - REDIS_PORT=${REDIS_PORT:-6379} - REDIS_URL=${REDIS_URL:-redis://plane-redis:6379/} # Application secret - SECRET_KEY=${SECRET_KEY:-60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5} # DATA STORE SETTINGS - USE_MINIO=${USE_MINIO:-1} - AWS_REGION=${AWS_REGION:-""} - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-"access-key"} - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-"secret-key"} - AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL:-http://s3.mydomain.com} - AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME:-uploads} - MINIO_ROOT_USER=${MINIO_ROOT_USER:-"access-key"} - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-"secret-key"} - BUCKET_NAME=${BUCKET_NAME:-uploads} - FILE_SIZE_LIMIT=${FILE_SIZE_LIMIT:-5242880} # Admin and Space URLs - ADMIN_BASE_URL=${ADMIN_BASE_URL} - SPACE_BASE_URL=${SPACE_BASE_URL} - APP_BASE_URL=${APP_BASE_URL}

services: web: <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-frontend:${APP_RELEASE:-stable} restart: unless-stopped command: node web/server.js web deploy: replicas: ${WEB_REPLICAS:-1} labels: - traefik.enable=true - traefik.http.routers.web.rule=Host(plane.mydomain.com) - traefik.http.routers.web.entrypoints=websecure - traefik.http.routers.web.tls=true - traefik.http.routers.web.tls.certresolver=letsencryptresolver - traefik.http.services.web.loadbalancer.server.port=3000 networks: - mynetwork

space: <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-space:${APP_RELEASE:-stable} restart: unless-stopped command: node space/server.js space deploy: replicas: ${SPACE_REPLICAS:-1} labels: - traefik.enable=true - traefik.http.routers.space.rule=Host(space.mydomain.com) - traefik.http.routers.space.entrypoints=websecure - traefik.http.routers.space.tls=true - traefik.http.routers.space.tls.certresolver=letsencryptresolver - traefik.http.services.space.loadbalancer.server.port=3000 networks: - mynetwork

admin: <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-admin:${APP_RELEASE:-stable} restart: unless-stopped command: node admin/server.js admin deploy: replicas: ${ADMIN_REPLICAS:-1} labels: - traefik.enable=true - traefik.http.routers.admin.rule=Host(admin.mydomain.com) - traefik.http.routers.admin.entrypoints=websecure - traefik.http.routers.admin.tls=true - traefik.http.routers.admin.tls.certresolver=letsencryptresolver - traefik.http.services.admin.loadbalancer.server.port=3000 networks: - mynetwork

api: <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable} restart: unless-stopped command: ./bin/docker-entrypoint-api.sh deploy: replicas: ${API_REPLICAS:-1} labels: - traefik.enable=true - traefik.http.routers.api.rule=Host(api.mydomain.com) - traefik.http.routers.api.entrypoints=websecure - traefik.http.routers.api.tls=true - traefik.http.routers.api.tls.certresolver=letsencryptresolver - traefik.http.services.api.loadbalancer.server.port=3000 volumes: - logs_api:/code/plane/logs networks: - mynetwork

worker: <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable} restart: unless-stopped command: ./bin/docker-entrypoint-worker.sh volumes: - logs_worker:/code/plane/logs depends_on: - api - plane-db - plane-redis networks: - mynetwork

beat-worker: <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable} restart: unless-stopped command: ./bin/docker-entrypoint-beat.sh volumes: - logs_beat-worker:/code/plane/logs depends_on: - api - plane-db - plane-redis networks: - mynetwork

migrator: <<: *app-env image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable} restart: "no" command: ./bin/docker-entrypoint-migrator.sh volumes: - logs_migrator:/code/plane/logs depends_on: - plane-db - plane-redis networks: - mynetwork

plane-db: image: postgres:15.5-alpine restart: unless-stopped command: postgres -c 'max_connections=1000' environment: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-plane} volumes: - pgdata:/var/lib/postgresql/data networks: - mynetwork

plane-redis: image: redis:7.2.5-alpine restart: unless-stopped volumes: - redisdata:/data networks: - mynetwork

volumes: pgdata: redisdata: logs_api: logs_worker: logs_beat-worker: logs_migrator:

networks: mynetwork: external: true name: mynetwork

Environment

Production

Browser

Other

Variant

Self-hosted

Version

stable

tykocompany avatar Jul 14 '24 13:07 tykocompany

@tykocompany, do you see any errors in the browser network console.

pablohashescobar avatar Jul 15 '24 08:07 pablohashescobar

@tykocompany

The set of docker images are built to run on 1 primary domain. I can see that you are trying to host all microservices on different domain. Try modifying it as below.

- traefik.http.routers.web.rule=Host(plane.mydomain.com)

- traefik.http.routers.space.rule=Host(plane.mydomain.com) && PathPrefix(`/spaces/`)

- traefik.http.routers.admin.rule=Host(plane.mydomain.com) && PathPrefix(`/god-mode/`)

- traefik.http.routers.api.rule=Host(plane.mydomain.com) && PathPrefix(`/api/`)
- traefik.http.routers.api.rule=Host(plane.mydomain.com) && PathPrefix(`/auth/`)

Also, you may want to refer plane.env for the additional variables which are not included in the docker-compose.yaml.

mguptahub avatar Jul 15 '24 08:07 mguptahub

I configured it as reported and checked it in the console as Pablo said. It did not load again and displayed the following error.

image

ghost avatar Jul 15 '24 13:07 ghost

@tykocompany, as @mguptahub suggested the current plane instance is not meant to be run on multiple domains. If you require running them on multiple domain you have to build your own images.

pablohashescobar avatar Jul 18 '24 08:07 pablohashescobar

@pablohashescobar configured the routes as @mguptahub recommended. But even with the configuration he recommended, an error occurred that I sent in the printout.

ghost avatar Jul 19 '24 02:07 ghost

@tykocompany can you please share the error you are getting after implementing the suggested changes ?

mguptahub avatar Jul 25 '24 16:07 mguptahub

@tykocompany

The set of docker images are built to run on 1 primary domain. I can see that you are trying to host all microservices on different domain. Try modifying it as below.

- traefik.http.routers.web.rule=Host(plane.mydomain.com)

- traefik.http.routers.space.rule=Host(plane.mydomain.com) && PathPrefix(`/spaces/`)

- traefik.http.routers.admin.rule=Host(plane.mydomain.com) && PathPrefix(`/god-mode/`)

- traefik.http.routers.api.rule=Host(plane.mydomain.com) && PathPrefix(`/api/`)
- traefik.http.routers.api.rule=Host(plane.mydomain.com) && PathPrefix(`/auth/`)

Also, you may want to refer plane.env for the additional variables which are not included in the docker-compose.yaml.

I pretty much did as what is suggested above. The api endpoint returns 404 for /api/instances/ and /api/users/me. I suspect all /api calls returns 404.

schizophrenical avatar Aug 09 '24 02:08 schizophrenical

I see there is issue with api service label traefik.http.services.api.loadbalancer.server.port=3000. This must be set to port 8000

Also update the router label for api

# FROM
- traefik.http.routers.api.rule=Host(plane.mydomain.com) && PathPrefix(`/api/`)
# TO
- traefik.http.routers.api.rule=Host(plane.mydomain.com) && (PathPrefix(`/api/`) || PathPrefix(`/auth/`)) 

Below is the sample docker-compose.yaml deployed locally

x-app-env: &app-env
  environment:
    - NGINX_PORT=${NGINX_PORT:-80}
    - WEB_URL=${WEB_URL:-http://localhost}
    - DEBUG=${DEBUG:-0}
    - SENTRY_DSN=${SENTRY_DSN:-""}
    - SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT:-"production"}
    - CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS:-}
    # Gunicorn Workers
    - GUNICORN_WORKERS=${GUNICORN_WORKERS:-1}
    #DB SETTINGS
    - PGHOST=${PGHOST:-plane-db}
    - PGDATABASE=${PGDATABASE:-plane}
    - POSTGRES_USER=${POSTGRES_USER:-plane}
    - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-plane}
    - POSTGRES_DB=${POSTGRES_DB:-plane}
    - POSTGRES_PORT=${POSTGRES_PORT:-5432}
    - PGDATA=${PGDATA:-/var/lib/postgresql/data}
    - DATABASE_URL=${DATABASE_URL:-postgresql://plane:plane@plane-db/plane}
    # REDIS SETTINGS
    - REDIS_HOST=${REDIS_HOST:-plane-redis}
    - REDIS_PORT=${REDIS_PORT:-6379}
    - REDIS_URL=${REDIS_URL:-redis://plane-redis:6379/}

    # RabbitMQ Settings
    - RABBITMQ_HOST=${RABBITMQ_HOST:-plane-mq}
    - RABBITMQ_PORT=${RABBITMQ_PORT:-5672}
    - RABBITMQ_DEFAULT_USER=${RABBITMQ_USER:-plane}
    - RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD:-plane}
    - RABBITMQ_DEFAULT_VHOST=${RABBITMQ_VHOST:-plane}
    - RABBITMQ_VHOST=${RABBITMQ_VHOST:-plane}
    - AMQP_URL=${AMQP_URL:-amqp://plane:plane@plane-mq:5672/plane}
    # Application secret
    - SECRET_KEY=${SECRET_KEY:-60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5}
    # DATA STORE SETTINGS
    - USE_MINIO=${USE_MINIO:-1}
    - AWS_REGION=${AWS_REGION:-""}
    - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-"access-key"}
    - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-"secret-key"}
    - AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL:-http://plane-minio:9000}
    - AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME:-uploads}
    - MINIO_ROOT_USER=${MINIO_ROOT_USER:-"access-key"}
    - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-"secret-key"}
    - BUCKET_NAME=${BUCKET_NAME:-uploads}
    - FILE_SIZE_LIMIT=${FILE_SIZE_LIMIT:-5242880}
    # Live server env
    - API_BASE_URL=${API_BASE_URL:-http://api:8000}

services:
  traefik:
    image: "traefik:v3.1"
    container_name: "traefik"
    ports:
      - "80:80"
    command:
      #- "--log.level=DEBUG"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entryPoints.web.address=:80"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  web:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-frontend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: if_not_present
    restart: unless-stopped
    command: node web/server.js web
    deploy:
      replicas: ${WEB_REPLICAS:-1}
    labels:
      - traefik.enable=true
      - traefik.http.routers.web.rule=Host("myplane.local")
      - traefik.http.routers.web.entrypoints=web
      - traefik.http.services.web.loadbalancer.server.port=3000
    depends_on:
      - api
      - worker

  space:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-space:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: if_not_present
    restart: unless-stopped
    command: node space/server.js space
    deploy:
      replicas: ${SPACE_REPLICAS:-1}
    labels:
      - traefik.enable=true
      - traefik.http.routers.space.rule=Host("myplane.local") && PathPrefix(`/spaces/`)
      - traefik.http.routers.space.entrypoints=web
      - traefik.http.services.space.loadbalancer.server.port=3000
    depends_on:
      - api
      - worker
      - web

  admin:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-admin:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: if_not_present
    restart: unless-stopped
    command: node admin/server.js admin
    deploy:
      replicas: ${ADMIN_REPLICAS:-1}
    labels:
      - traefik.enable=true
      - traefik.http.routers.admin.rule=Host("myplane.local") && PathPrefix(`/god-mode/`)
      - traefik.http.routers.admin.entrypoints=web
      - traefik.http.services.admin.loadbalancer.server.port=3000
    depends_on:
      - api
      - web

  live:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-live:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: if_not_present
    restart: unless-stopped
    command: node live/dist/server.js live
    deploy:
      replicas: ${LIVE_REPLICAS:-1}
    labels:
      - traefik.enable=true
      - traefik.http.routers.live.rule=Host("myplane.local") && PathPrefix(`/live/`)
      - traefik.http.routers.live.entrypoints=web
      - traefik.http.services.live.loadbalancer.server.port=3000
    depends_on:
      - api
      - web

  api:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: if_not_present
    restart: unless-stopped
    command: ./bin/docker-entrypoint-api.sh
    deploy:
      replicas: ${API_REPLICAS:-1}
    labels:
      - traefik.enable=true
      - traefik.http.routers.api.rule=Host("myplane.local") && (PathPrefix(`/api/`) || PathPrefix(`/auth/`))
      - traefik.http.routers.api.entrypoints=web
      - traefik.http.services.api.loadbalancer.server.port=8000
    volumes:
      - logs_api:/code/plane/logs
    depends_on:
      - plane-db
      - plane-redis
      - plane-mq

  worker:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: if_not_present
    restart: unless-stopped
    command: ./bin/docker-entrypoint-worker.sh
    volumes:
      - logs_worker:/code/plane/logs
    depends_on:
      - api
      - plane-db
      - plane-redis
      - plane-mq

  beat-worker:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: if_not_present
    restart: unless-stopped
    command: ./bin/docker-entrypoint-beat.sh
    volumes:
      - logs_beat-worker:/code/plane/logs
    depends_on:
      - api
      - plane-db
      - plane-redis
      - plane-mq

  migrator:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: if_not_present
    restart: "no"
    command: ./bin/docker-entrypoint-migrator.sh
    volumes:
      - logs_migrator:/code/plane/logs
    depends_on:
      - plane-db
      - plane-redis

  plane-db:
    <<: *app-env
    image: postgres:15.7-alpine
    pull_policy: if_not_present
    restart: unless-stopped
    command: postgres -c 'max_connections=1000'
    volumes:
      - pgdata:/var/lib/postgresql/data

  plane-redis:
    <<: *app-env
    image: valkey/valkey:7.2.5-alpine
    pull_policy: if_not_present
    restart: unless-stopped
    volumes:
      - redisdata:/data

  plane-mq:
    <<: *app-env
    image: rabbitmq:3.13.6-management-alpine
    restart: always
    volumes:
      - rabbitmq_data:/var/lib/rabbitmq

  plane-minio:
    <<: *app-env
    image: minio/minio:latest
    pull_policy: if_not_present
    restart: unless-stopped
    command: server /export --console-address ":9090"
    labels:
      - traefik.enable=true
      - traefik.http.routers.plane-minio.rule=Host("myplane.local") && PathPrefix(`/uploads/`)
      - traefik.http.routers.plane-minio.entrypoints=web
      - traefik.http.services.plane-minio.loadbalancer.server.port=9000
    volumes:
      - uploads:/export

  # Comment this if you already have a reverse proxy running
  # proxy:
  #   <<: *app-env
  #   image: ${DOCKERHUB_USER:-makeplane}/plane-proxy:${APP_RELEASE:-stable}
  #   platform: ${DOCKER_PLATFORM:-}
  #   pull_policy: if_not_present
  #   restart: unless-stopped
  #   ports:
  #     - ${NGINX_PORT}:80
  #   depends_on:
  #     - web
  #     - api
  #     - space

volumes:
  pgdata:
  redisdata:
  
  uploads:
  logs_api:
  logs_worker:
  logs_beat-worker:
  logs_migrator:
  rabbitmq_data:

This is not an issue anymore. Closing it for now.

Feel free to reopen in-case if needed.

mguptahub avatar Oct 16 '24 07:10 mguptahub