langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
47.06k stars 6.68k forks source link

Troubleshooting GitHub Login Issue and .ENV Configuration for Cloud Deployment #1432

Closed chalitbkb closed 11 months ago

chalitbkb commented 11 months ago

Provide a description of the help you need

Could anyone help me set up the .ENV for 'cloud'? I've successfully deployed both the backend and frontend to the public, but when I click the GitHub login button, nothing happens. I already have Postgres, but I'm not sure if there's something I haven't configured correctly or if there are any missing settings. Can you provide an example for me?

Base_URL

basebackend-me = https://backendabc.up.railway.app
basefrontend-me =  https://frontabc.vercel.app

Below is what I've done and what's in my ENV::

frontend env


--> NEXT_PUBLIC_DEPLOY_ENV=PRODUCTION
--> NEXT_PUBLIC_EDITION=CLOUD
--> NEXT_PUBLIC_API_PREFIX=https://backendabc.up.railway.app/console/api
--> NEXT_PUBLIC_PUBLIC_API_PREFIX=https://backendabc.up.railway.app/api

NEXT_PUBLIC_SENTRY_DSN=

backend env

--> EDITION=CLOUD
--> SECRET_KEY=abc123abc456abc123
--> CONSOLE_API_URL=https://backendabc.up.railway.app
--> CONSOLE_WEB_URL=https://backendabc.up.railway.app
--> SERVICE_API_URL=https://backendabc.up.railway.app
--> APP_API_URL=https://backendabc.up.railway.app
--> APP_WEB_URL=https://frontabc.vercel.app_**
CELERY_BROKER_URL=redis://:difyai123456@localhost:6379/1
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_USERNAME=
REDIS_PASSWORD=difyai123456
REDIS_DB=0
--> _DB_USERNAME= -USE-  Postgres DB
--> DB_PASSWORD= -USE-
--> DB_HOST=   -USE-
DB_PORT=5432
DB_DATABASE=dify
STORAGE_TYPE=local
STORAGE_LOCAL_PATH=storage
S3_ENDPOINT=https://your-bucket-name.storage.s3.clooudflare.com
S3_BUCKET_NAME=your-bucket-name
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key
S3_REGION=your-region
--> WEB_API_CORS_ALLOW_ORIGINS=https://backendabc.up.railway.app,,*
--> CONSOLE_CORS_ALLOW_ORIGINS=https://backendabc.up.railway.app,,*
VECTOR_STORE=weaviate
WEAVIATE_ENDPOINT=http://localhost:8080
WEAVIATE_API_KEY=WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
WEAVIATE_GRPC_ENABLED=false
WEAVIATE_BATCH_SIZE=100
QDRANT_URL=http://localhost:6333
QDRANT_API_KEY=difyai123456
MILVUS_HOST=127.0.0.1
MILVUS_PORT=19530
MILVUS_USER=root
MILVUS_PASSWORD=Milvus
MILVUS_SECURE=false
MAIL_TYPE=
MAIL_DEFAULT_SEND_FROM=no-reply <no-reply@dify>
RESEND_API_KEY=
SENTRY_DSN=
DEBUG=false
SQLALCHEMY_ECHO=false
NOTION_INTEGRATION_TYPE=public
NOTION_CLIENT_SECRET=you-client-secret
NOTION_CLIENT_ID=you-client-id
NOTION_INTERNAL_SECRET=you-internal-secret
HOSTED_OPENAI_ENABLED=false
HOSTED_OPENAI_API_KEY=
HOSTED_OPENAI_API_BASE=
HOSTED_OPENAI_API_ORGANIZATION=
HOSTED_OPENAI_QUOTA_LIMIT=200
HOSTED_OPENAI_PAID_ENABLED=false
HOSTED_OPENAI_PAID_STRIPE_PRICE_ID=
HOSTED_OPENAI_PAID_INCREASE_QUOTA=1
HOSTED_AZURE_OPENAI_ENABLED=false
HOSTED_AZURE_OPENAI_API_KEY=
HOSTED_AZURE_OPENAI_API_BASE=
HOSTED_AZURE_OPENAI_QUOTA_LIMIT=200
HOSTED_ANTHROPIC_ENABLED=false
HOSTED_ANTHROPIC_API_BASE=
HOSTED_ANTHROPIC_API_KEY=
HOSTED_ANTHROPIC_QUOTA_LIMIT=600000
HOSTED_ANTHROPIC_PAID_ENABLED=false
HOSTED_ANTHROPIC_PAID_STRIPE_PRICE_ID=
HOSTED_ANTHROPIC_PAID_INCREASE_QUOTA=1000000
HOSTED_ANTHROPIC_PAID_MIN_QUANTITY=20
HOSTED_ANTHROPIC_PAID_MAX_QUANTITY=100
STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=
crazywoola commented 11 months ago

Sorry, for this kind of support of deploying a 'Cloud' version needs to obtain a commercial license from us. Please contact business@dify.ai to get a quota. :)

https://docs.dify.ai/community/open-source

chalitbkb commented 11 months ago

Sorry, for this kind of support of deploying a 'Cloud' version needs to obtain a commercial license from us. Please contact business@dify.ai to get a quota. :)

https://docs.dify.ai/community/open-source

Thank you, but I need to test it on the Cloud to see the difference. I am confident that it won't be used for any financial purposes. So, for research purposes, I would like you to help me with setting up the configuration as an example. This is for me to test its deployment on the Cloud only, without any financial usage.

crazywoola commented 11 months ago

In Cloud version, you can only login with the GitHub and Google account only while you can only login with the password and email in CE. And Cloud only support the cloud providers, but the CE supoorts some native model providers, there is no big difference there.

chalitbkb commented 11 months ago

In Cloud version, you can only login with the GitHub and Google account only while you can only login with the password and email in CE. And Cloud only support the cloud providers, but the CE supoorts some native model providers, there is no big difference there.

From the url base backend and bases frontend, could you please try configuring an example .env for me? I want to know what part I'm defining wrong.