swiple icon indicating copy to clipboard operation
swiple copied to clipboard

[Bug]: can’t access the website

Open acracker opened this issue 1 year ago • 4 comments

Initial Checks

  • [X] I have searched GitHub for a duplicate issue and I'm sure this is something new
  • [X] I have searched Google & StackOverflow for a solution and couldn't find anything
  • [X] I have read and followed the docs and the FAQ's and still think this is a bug
  • [X] I am confident that the issue is with swiple and not my configuration in docker/.env or docker/.env-non-dev

Description

I installed Swiple via Docker on a remote computer, but I can’t access the website. The remote computer’s IP address is 192.168.123.88. When I try to access http://192.168.123.88:3000/ through the browser, I noticed that the browser is making a request to this endpoint http://127.0.0.1:8000/api/v1/user/me. I think this might be the reason for the issue. So, I searched for “8000” in the project folder and replaced it with “3001,” then executed “docker compose -f docker-compose-non-dev.yaml up.” However, it didn’t work, and it’s still trying to access http://127.0.0.1:8000/api/v1/user/me.

If UI related, what browsers are you seeing the problem on?

No response

Relevant log output

[root@172-16-0-175 swiple]# grep -rn 3001 . |grep -v backend/app/sample_data/data |grep -v  poetry.lock |grep 3001
./backend/app/settings.py:27:    SWIPLE_API_URL: AnyHttpUrl = Field(default="http://swiple_api:3001")
./backend/app/settings.py:30:    BACKEND_CORS_ORIGINS: List[AnyHttpUrl] = Field(default=["http://swiple_api:3001", "http://127.0.0.1:3000"])
./backend/Dockerfile:54:CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "3001"]
./backend/main.py:5:    uvicorn.run("app.main:app", host="0.0.0.0", port=3001, reload=True, env_file="../docker/.env-local")
./docker/.env-local:2:SWIPLE_API_URL=http://192.168.123.88:3001
./docker/.env-local:4:BACKEND_CORS_ORIGINS=["http://127.0.0.1:3000", "http://192.168.123.88:3001", "http://192.168.123.88:3000"]
./docs/package.json:7:    "start": "docusaurus start --port 3001",
./docs/package.json:12:    "serve": "docusaurus serve --port 3001",
./frontend/.env.development:1:REACT_APP_API_DOMAIN=http://192.168.123.88:3001/api/v1
./frontend/.env.production:1:REACT_APP_API_DOMAIN=http://192.168.123.88:3001/api/v1
./docker-compose.yaml:19:    command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "3001", "--reload"]
./docker-compose.yaml:22:      - "3001:3001"
./docker-compose-non-dev.yaml:23:      - "3001:3001"

acracker avatar Dec 04 '23 09:12 acracker