askides/aurora

Help - How to change endpoints from localhost to IP?

Closed this issue · 4 comments

First, great app!

Just installed Aurora with Docker but I'm not able to set it up. The problem is all calls are refused and I guess it's because they're sent to localhost rather than my server's IP. This is my .yml configuration file:

version: "3.7"
services:
  ui:
    image: ghcr.io/useaurora/aurora/aurora
    ports:
      - "3000:3000"
    environment:
      NEXT_PUBLIC_API_URL: http://1.1.1.1:5000
    depends_on:
      - postgres

  api:
    image: ghcr.io/useaurora/api/api
    ports:
      - "5000:5000"
    environment:
      DB_CONNECTION: pg
      DB_HOST: postgres
      DB_PORT: 5432
      DB_DATABASE: aurora
      DB_USERNAME: aurora
      DB_PASSWORD: aurora
      DB_SSL: "false"

      JWT_SECRET: djd83ng94hf03hf93j
      AUTH_MODE: jwt
    depends_on:
      - postgres

  postgres:
    image: postgres:12-alpine
    environment:
      POSTGRES_DB: aurora
      POSTGRES_USER: aurora
      POSTGRES_PASSWORD: aurora
    volumes:
      - aurora_postgres:/var/lib/postgresql/data

volumes:
  aurora_postgres:

Basically copied from the docs and changed from localhost to my own IP in the NEXT_PUBLIC_API_URL parameter. Pretty sure I'm doing something wrong! How do I fix this? Thanks!

Hi!

Thank you for your issue.

Please, try to stop and delete your containers, and run a new instance.

The UI service applies a string_replace in the container entry point, replacing a placeholder with your NEXT_PUBLIC_API_URL.
This action is done once at the first container run, so if you need to change it, delete the UI service (it's stateless, so don't worry) and run it again.

Let me know if this solves the issue.

Regards!

Renny

Ciao Renato!
I already stopped and ran new instances of the containers, even tried to delete all of them and start from scratch but the endpoint is still the same. To be honest I'm not sure how the updated environment variables are not deployed. Is there a way to manually replace the placeholder in the code?

Thanks!
Damiano

Update, somehow I got it working. Tried to stop all containers and delete them, this time it worked.

Good!

Nice to hear that!

Have a nice day!