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

Provide a separate WOODPECKER_GITEA_API_URL for easier local setup #3470

Closed
3 tasks done
everflux opened this issue Mar 7, 2024 · 6 comments · Fixed by #3513
Closed
3 tasks done

Provide a separate WOODPECKER_GITEA_API_URL for easier local setup #3470

everflux opened this issue Mar 7, 2024 · 6 comments · Fixed by #3513
Labels
enhancement improve existing features

Comments

@everflux
Copy link

everflux commented Mar 7, 2024

Clear and concise description of the problem

When running inside kubernetes/docker without externally reachable domains, the .local and .localhost domains can be used for browser based access.
These point to 127.0.0.1 which does not work for inter-container connectivity.

Suggested solution

An optional, separate env for the API of gitea server for OAuth and API requests that is separate from the URL that is accessed by the browser of the user would fix that.

Alternative

No response

Additional context

No response

Validations

  • Checked that the feature isn't part of the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@everflux everflux added the feature add new functionality label Mar 7, 2024
@qwerty287
Copy link
Contributor

There's a hidden flag https://github.com/woodpecker-ci/woodpecker/blob/main/cmd%2Fserver%2Fflags.go#L486-L492 which should work for you I think

@qwerty287
Copy link
Contributor

@everflux did this solve your issue?

@qwerty287 qwerty287 added feedback this needs feedback and removed feature add new functionality labels Mar 13, 2024
@everflux
Copy link
Author

I looks promising, I did not have time for testing, though. If it indeed solves the issue it might be very helpful to add it to the documentation.

@everflux
Copy link
Author

It does not seem to work for my environment. (Context: I want to give woodpecker/gitea based trainings using a minikube cluster with no external domains)

This is my setup:
WOODPECKER_HOST http://woodpecker.localhost
WOODPECKER_GITEA_URL http://gitea-http.gitea:3000
WOODPECKER_DEV_OAUTH_HOST http://gitea.localhost

The oauth redirect is performed to http://gitea-http.gitea:3000 it seems the dev setting is overridden by the gitea url.

@qwerty287
Copy link
Contributor

Maybe I was wrong and the dev env sets the URL for oauth redirection... Not sure, I can try to take a look in the next days

@qwerty287 qwerty287 added enhancement improve existing features and removed feedback this needs feedback labels Mar 20, 2024
@anbraten
Copy link
Member

anbraten commented Mar 20, 2024

As a side note, we have a gitpod setup which we used quite successful for workshop purposes some time ago.

qwerty287 added a commit that referenced this issue Mar 21, 2024
closes #3470

---------

Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants