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

Replace NEXT_PUBLIC_API_URI instead of API_URI #119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

emreloper
Copy link

PLUNK_API_URI is a placeholder for NEXT_PUBLIC_API_URI inside the Dockerfile.

ARG NEXT_PUBLIC_API_URI=PLUNK_API_URI

API_URI variable could be an internal URI like http://plunk:3000 while NEXT_PUBLIC_API_URI has to be public.

Separating internal and public URI variables can help with performance by avoiding network overhead for server requests.

This commit also solves the issue #114 by using an internal URI for API_URI.

`PLUNK_API_URI` is a placeholder for `NEXT_PUBLIC_API_URI` inside the Dockerfile. `API_URI` variable could be an internal URI like `http://plunk:3000` while `NEXT_PUBLIC_API_URI` has to be public.

Separating internal and public URI variables can help with performance by avoiding network overhead for server requests.

This commit also solves the issue useplunk#114.
@driaug
Copy link
Member

driaug commented Oct 29, 2024

This would require quite some changing in documentation and templates.

I am also not sure if this would actually solve the #114 since the internal endpoint is probably not reachable if the public one isn't either. Adding retry logic to the CRON job might be the easier and more sustainable solution to this.

@emreloper
Copy link
Author

This would require quite some changing in documentation and templates.

I am also not sure if this would actually solve the #114 since the internal endpoint is probably not reachable if the public one isn't either. Adding retry logic to the CRON job might be the easier and more sustainable solution to this.

I have a self-hosted instance on Hetzer with Cloudflare DNS. I was getting the same issue as #114. The cron job was not able to reach to the public URL after running a few times even if I could reach it on a browser. It could be related to Cloudflare security rules but I couldn't solve it.

After separating internal and public URLs for server/client requests, that issue was resolved. Right now the dashboard and sending transational mails work for me. I didn't have a new issue since 3 days.

However, I'm not familiar with the entire codebase. If this can cause issues, feel free to close the PR. I just wanted to help ✌️

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

Successfully merging this pull request may close these issues.

2 participants