mirror of
https://github.com/pldubouilh/gossa
synced 2025-12-15 21:04:24 +01:00
merge master
This commit is contained in:
commit
ccd6ae2bea
4 changed files with 7 additions and 2 deletions
2
.github/workflows/go.yml
vendored
2
.github/workflows/go.yml
vendored
|
|
@ -1,5 +1,5 @@
|
|||
name: ci
|
||||
on: [push]
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ func hash(s string) string {
|
|||
func exitPath(w http.ResponseWriter, s ...interface{}) {
|
||||
if r := recover(); r != nil {
|
||||
log.Println("error", s, r)
|
||||
w.WriteHeader(500)
|
||||
w.Write([]byte("error"))
|
||||
} else if *verb {
|
||||
log.Println(s...)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ COPY . /gossaSrc
|
|||
RUN cd /gossaSrc && make
|
||||
|
||||
FROM alpine
|
||||
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared"
|
||||
EXPOSE 8001
|
||||
RUN apk add --no-cache su-exec
|
||||
COPY --from=builder /gossaSrc/gossa /gossa
|
||||
ENTRYPOINT [ "/gossa", "-h", "0.0.0.0", "/shared" ]
|
||||
RUN echo -e 'exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} ${DATADIR}'>> /start.sh
|
||||
ENTRYPOINT [ "sh", "/start.sh" ]
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ if you prefer building the image yourself :
|
|||
% sudo docker run -v ~/LocalDirToShare:/shared -p 8001:8001 gossa
|
||||
```
|
||||
|
||||
the options are settable through environment variables that can be passed starting off the docker image.
|
||||
|
||||
a fancy docker image using [Caddy](https://caddyserver.com/) is also provided. a simple config is embedded in the docker file, and shows how to use http basic authentication, and automatic TLS for hands-free https 🎉
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue