mirror of
https://github.com/simongregorebner/gitea-pages.git
synced 2025-04-21 02:10:02 +02:00
update dockerfile / readme
change again default
This commit is contained in:
parent
b749679e17
commit
df43b513ab
@ -2,6 +2,9 @@ FROM caddy:builder-alpine AS builder
|
||||
|
||||
RUN xcaddy build --with github.com/simongregorebner/gitea-pages
|
||||
|
||||
|
||||
FROM alpine
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
CMD ["/usr/bin/caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
@ -47,6 +47,13 @@ Afterward you can simply run:
|
||||
./caddy run --config Caddyfile
|
||||
```
|
||||
|
||||
If you build/use the docker container you can run it like this:
|
||||
|
||||
```bash
|
||||
# Create a Caddyfile (configuration file) first !
|
||||
docker run -v $(pwd)/Caddyfile:/etc/caddy/Caddyfile -p 8080:8080 gitea-pages
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
These are the possible configuration options with their defaults:
|
||||
@ -60,7 +67,7 @@ gitea-pages {
|
||||
server https://your-gitea-server
|
||||
token gitea-access-token
|
||||
pages_branch gitea-pages
|
||||
postfix_pages_repository gitea.io
|
||||
postfix_pages_repository gitea-pages
|
||||
url_scheme simple
|
||||
}
|
||||
log {
|
||||
|
@ -77,7 +77,7 @@ func (module *GiteaPagesModule) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
|
||||
module.PagesBranch = "gitea-pages"
|
||||
}
|
||||
if module.PostfixPagesRepository == "" {
|
||||
module.PostfixPagesRepository = "gitea.io"
|
||||
module.PostfixPagesRepository = "gitea-pages"
|
||||
}
|
||||
|
||||
if module.URLScheme == "" {
|
||||
@ -99,7 +99,6 @@ func (module GiteaPagesModule) ServeHTTP(writer http.ResponseWriter, request *ht
|
||||
|
||||
var organization, repository, path string
|
||||
if module.URLScheme == "simple" {
|
||||
fmt.Println("SIMPLE")
|
||||
// "Simple" URL case - we expect the organization and repository in the URL
|
||||
// The URL/path looks like http(s)://<giteaserver>[:<port>]/<organization>/<repository>[/<filepath>]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user