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

Doc - update isunfa serverswarm readme #45

Open
arealclimber opened this issue Dec 18, 2024 · 2 comments
Open

Doc - update isunfa serverswarm readme #45

arealclimber opened this issue Dec 18, 2024 · 2 comments
Assignees
Labels
3 hard level 3 documentation Improvements or additions to documentation

Comments

@arealclimber
Copy link
Member

arealclimber commented Dec 18, 2024

Summary

在本地運行時無法透過 google oauth 登入

Details

在本地運行的 server swarm isunfa,設定Doman之後,運行isunfa的服務無法透過Google登入,需做以下更改才能用Google登入,但會讓 AICH, FAITH 服務無法運行

  1. 更改 .env

    # DOMAIN=isunfa.tw
    
    DOMAIN=127.0.0.1
  2. 更改 .env.isunfa

    # NEXTAUTH_URL = https://${DOMAIN}
    # NEXT_PUBLIC_DOMAIN = https://${DOMAIN}
    
    NEXTAUTH_URL = http://${DOMAIN}
    NEXT_PUBLIC_DOMAIN = http://${DOMAIN}

需要更改 server swarm 跟註冊 google oauth url 跟補充文件,讓開發者跟著文件可以選擇在本地或雲端運行 server swarm

@arealclimber arealclimber added documentation Improvements or additions to documentation 1 hard level 1 labels Dec 18, 2024
@arealclimber arealclimber self-assigned this Dec 18, 2024
@arealclimber
Copy link
Member Author

Google oauth 註冊 http://localhost/api/auth/callback/google,但是在本地運行時,/etc/hosts 註冊 IP 位置對應 localhost,並在 .env 裡將 DOMAIN 註冊為 localhost,運行docker之後,瀏覽器輸入 http://localhost 會導向 nginx 預設網頁而不是 isunfa landing page;雖然 AICH, FAITH 分別可通過 http://aich.localhost/, http://faith.localhost/ ,isunfa 可透過 docker compose exec isunfa /bin/bash 進入 docker container 輸入 curl http://isunfa:5566 access to isunfa website

@arealclimber arealclimber added 2 hard level 2 3 hard level 3 and removed 1 hard level 1 2 hard level 2 labels Dec 18, 2024
@arealclimber
Copy link
Member Author

arealclimber commented Dec 18, 2024

took 2 hrs
remaining 1.5 hrs

  • 使用另一個 google client id & secret 去測試在本地 domain 設為 isunfa.org 時可不可以成功用 google 登入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 hard level 3 documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant