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

Using a different genesis url when deployed #48

Open
2 tasks done
Kampe opened this issue Jul 2, 2024 · 6 comments
Open
2 tasks done

Using a different genesis url when deployed #48

Kampe opened this issue Jul 2, 2024 · 6 comments
Labels
question Further information is requested

Comments

@Kampe
Copy link

Kampe commented Jul 2, 2024

I've found a bug and checked that ...

  • ...there are no open or closed issues that are related to my problem
  • ...it's definitely a bug and not a feature request

Description

OCULAR_GENESIS_HOST does not like being set to "/" "" or null

Environment

OCULAR_GENESIS_HOST="/"

Expected behaviour

OCULAR_GENESIS_HOST uses the root and not /api

Steps to reproduce

No response

Additional info

No response

@simonwep
Copy link
Owner

simonwep commented Jul 2, 2024

Could you please elaborate what you're trying to achieve with

OCULAR_GENESIS_HOST="/"

Or it being set to null?

@simonwep simonwep added invalid This doesn't seem right unclear Needs clarification and removed invalid This doesn't seem right labels Jul 2, 2024
@Kampe
Copy link
Author

Kampe commented Jul 2, 2024

The problem is with the default configuration running in anything except docker compose with nginx.

simonwep/genesis#4 is related

Currently api responds only on / while the frontend is sending all requests to /api/ - allowing this base url to be set would fix this issue

@Kampe
Copy link
Author

Kampe commented Jul 3, 2024

The problem is actually a little different then I originally thought late last night, some api routes work just fine when using a rewrite, however the frontend still attempts to go to invalid URLs strangely enough:
Screenshot 2024-07-02 at 8 55 14 PM

Any idea why this happens? I'm able to hit /api/data without issue and receive a 200 with an empty object.

I can also log in and out without issue. However both calls to /api/data and /api/settings fail (it attempts /api/data/settings)

@Kampe Kampe changed the title OCULAR_GENESIS_HOST allow setting of OCULAR_GENESIS_HOST Jul 3, 2024
@simonwep
Copy link
Owner

simonwep commented Jul 6, 2024

Yeah this will require a change in both projects. Not sure about the frontend though as OCULAR_GENESIS_HOST is baked into the build, you'd have to build the docker-image yourself or we'd have to add an nginx config for the frontend container to make this a runtime option.

@simonwep simonwep added question Further information is requested and removed unclear Needs clarification labels Jul 6, 2024
@simonwep simonwep changed the title allow setting of OCULAR_GENESIS_HOST Using a different genesis url when deployed Jul 6, 2024
@Kampe
Copy link
Author

Kampe commented Jul 6, 2024

Yeah, not sure that's the right environment variable for setting that, am completely open to any and all options would love to just get it working as it seems like a fantastic tool for my family, great work!

@simonwep
Copy link
Owner

Alright, I added the change to genesis. The frontend however is built and fix - it will require that, for a deployment outside of docker-compose, GENESIS_BASE_URL is set to /api/. If you want to change the URL the frontend makes requests to you will have to build the docker-image yourself, which should be pretty straight forward. Basically just changing OCULAR_GENESIS_HOST and running docker build . -t --env-file .env ocular or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants