mirror of
https://github.com/simongregorebner/gitea-pages.git
synced 2025-06-07 22:10:41 +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
|
RUN xcaddy build --with github.com/simongregorebner/gitea-pages
|
||||||
|
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
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
|
./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
|
## Configuration
|
||||||
|
|
||||||
These are the possible configuration options with their defaults:
|
These are the possible configuration options with their defaults:
|
||||||
@ -60,7 +67,7 @@ gitea-pages {
|
|||||||
server https://your-gitea-server
|
server https://your-gitea-server
|
||||||
token gitea-access-token
|
token gitea-access-token
|
||||||
pages_branch gitea-pages
|
pages_branch gitea-pages
|
||||||
postfix_pages_repository gitea.io
|
postfix_pages_repository gitea-pages
|
||||||
url_scheme simple
|
url_scheme simple
|
||||||
}
|
}
|
||||||
log {
|
log {
|
||||||
|
@ -77,7 +77,7 @@ func (module *GiteaPagesModule) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
|
|||||||
module.PagesBranch = "gitea-pages"
|
module.PagesBranch = "gitea-pages"
|
||||||
}
|
}
|
||||||
if module.PostfixPagesRepository == "" {
|
if module.PostfixPagesRepository == "" {
|
||||||
module.PostfixPagesRepository = "gitea.io"
|
module.PostfixPagesRepository = "gitea-pages"
|
||||||
}
|
}
|
||||||
|
|
||||||
if module.URLScheme == "" {
|
if module.URLScheme == "" {
|
||||||
@ -99,7 +99,6 @@ func (module GiteaPagesModule) ServeHTTP(writer http.ResponseWriter, request *ht
|
|||||||
|
|
||||||
var organization, repository, path string
|
var organization, repository, path string
|
||||||
if module.URLScheme == "simple" {
|
if module.URLScheme == "simple" {
|
||||||
fmt.Println("SIMPLE")
|
|
||||||
// "Simple" URL case - we expect the organization and repository in the URL
|
// "Simple" URL case - we expect the organization and repository in the URL
|
||||||
// The URL/path looks like http(s)://<giteaserver>[:<port>]/<organization>/<repository>[/<filepath>]
|
// The URL/path looks like http(s)://<giteaserver>[:<port>]/<organization>/<repository>[/<filepath>]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user