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

[discussion] Gitea pages server (GitHub pages, web hosting, serving git repository contents as a site) #23521

Closed
wxiaoguang opened this issue Mar 16, 2023 · 14 comments · Fixed by #23993
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first. type/summary This issue aggregates a bunch of other issues

Comments

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Mar 16, 2023

Like GitHub pages, there are many feature requests for Gitea builtin pages service.

The initial issue is #302 , at that time (2016~2019) , the conclusion was that it's not on the roadmap.

Today, more and more people are asking about "Pages" feature, so I'd like to summary them, and maybe it's time to discuss a new conclusion.

Relate issues:

If Gitea wants to put this feature on its roadmap, it's a big feature, and it needs to be designed first, especially for security.

If this feautre is not on Gitea's roadmap, then I think it's better to provide a clear document about how to setup a pages service with production-level servers, eg: Codeberg pages-server , it's already mentioned in many issues, and it works well for Gitea.

@wxiaoguang wxiaoguang added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Mar 16, 2023
@wxiaoguang wxiaoguang changed the title [discussion] Pages service (serving git repository contents as a site) [discussion] Builtin pages server (serving git repository contents as a site) Mar 16, 2023
@lunny
Copy link
Member

lunny commented Mar 16, 2023

There is also an interesting closed PR #9811 .

@lunny lunny added type/summary This issue aggregates a bunch of other issues and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Mar 16, 2023
@JakobDev
Copy link
Contributor

JakobDev commented Mar 16, 2023

I don't think, Gitea needs to offer a own server. A existing server like e.g. can be used. And on Gitea side we can add a config like this:

[pages]
ENABLED = true
DIRECTORY = /path/to/directory

So Gitea just needs to copy the files to the specific directory (could also be some mounted directory from another server) and let the chosen Server Software (e.g. ngnix) do the rest.

@lunny
Copy link
Member

lunny commented Mar 16, 2023

OK. Maybe we can have an HTML Package concept like npm package. And if a special domain could be bind, it will serve as a static server. Looks like an interesting thing.

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Mar 16, 2023

let the chosen Server Software (e.g. ngnix) do the rest.

That's also a good idea (especially for personal or small team usage), if the reverse-proxy servers could proxy the requests to Gitea's exported / raw / package handlers to fetch contents. (I haven't tried but I guess it might be feasible)

@KN4CK3R
Copy link
Member

KN4CK3R commented Mar 16, 2023

I talked with @lunny and the generic package type could store and save pre-compiled HTML output. It may be necessary to create a new package type for that job to tweak the current ui or hide it from users. An action could then create the files and store them as a package which a proxy could serve with a different domain.

@lunny
Copy link
Member

lunny commented Mar 16, 2023

A dynamic rule could be configured from action to implement dynamic sub domain. We can write a PageAction to make the process easier.

@6543
Copy link
Member

6543 commented Mar 16, 2023

I am against add a build in pages server ... as I generalize the Pages-Server,

so anybody should be capable to setup it. It's also a single binary with good default settings,

and the only thing that is not generic are the error pages, that show the codeberg logo at the moment. witch https://codeberg.org/Codeberg/pages-server/issues/199 should solve.

Just blow up gitea for no good reason is bad

@6543
Copy link
Member

6543 commented Mar 16, 2023

as it's requested a lot I would just add this project directly in the feature-comparsion-sheet and document it well.
-> make it easy to discover

If you are afraid/don't like that it's tied to much to CB I'm also happy to maintain a fork that just switches the default settings to gitea and its logo ...

PS: added a dedicated issue to track selfhosting: https://codeberg.org/Codeberg/pages-server/issues/207

@6543
Copy link
Member

6543 commented Mar 16, 2023

PS: that should not hinder to build actions to build the pages branch ... it does integrate with that well too ...

@jolheiser
Copy link
Member

I do think giving pages-server more visibility would help, and I also agree this doesn't need to be solved in Gitea main.

@silverwind
Copy link
Member

Would call the feature "Web hosting", Wikipedia also calls it that.

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Mar 16, 2023

I'm not sure whether the "reverse-proxy"-kind approach works, if it does, then it seems an easy way for personal usage or small team usage. If they don't care about security, they could even use the same domain (that's user's choice 😂)

Actually I also feel it's better to use production-level Pages-Server to provide pages service, instead of blowing up Gitea. I just saw some new issues about this proposal, so I opened this discussion issue (to help users with such requirements). I guess a document with some samples would help future users who need this feature.


Update: I edited the issue title to avoid misleading.

@wxiaoguang wxiaoguang changed the title [discussion] Builtin pages server (serving git repository contents as a site) [discussion] Gitea pages server (GitHub pages, web hosting, serving git repository contents as a site) Mar 16, 2023
@lunny
Copy link
Member

lunny commented Mar 17, 2023

I am against add a build in pages server ... as I generalize the Pages-Server,

so anybody should be capable to setup it. It's also a single binary with good default settings,

and the only thing that is not generic are the error pages, that show the codeberg logo at the moment. witch https://codeberg.org/Codeberg/pages-server/issues/199 should solve.

Just blow up gitea for no good reason is bad

Of course, that's why we closed so many request issues. For now, the possible answers of the requirement I think are two.

  1. Use https://codeberg.org/Codeberg/pages-server
  2. Use a reverse proxy server that redirects to the package URL of Gitea.

jolheiser pushed a commit that referenced this issue Apr 11, 2023
…atic pages (#23993)

close  #23521

---------

Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Apr 11, 2023
…atic pages (go-gitea#23993)

close  go-gitea#23521

---------

Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
delvh added a commit that referenced this issue Apr 11, 2023
…atic pages (#23993) (#24058)

Backport #23993 by @6543

close  #23521

Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first. type/summary This issue aggregates a bunch of other issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants