mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-09-05 16:47:39 -04:00
merge master
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
name: ci
|
name: ci
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ func hash(s string) string {
|
|||||||
func exitPath(w http.ResponseWriter, s ...interface{}) {
|
func exitPath(w http.ResponseWriter, s ...interface{}) {
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
log.Println("error", s, r)
|
log.Println("error", s, r)
|
||||||
|
w.WriteHeader(500)
|
||||||
w.Write([]byte("error"))
|
w.Write([]byte("error"))
|
||||||
} else if *verb {
|
} else if *verb {
|
||||||
log.Println(s...)
|
log.Println(s...)
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ COPY . /gossaSrc
|
|||||||
RUN cd /gossaSrc && make
|
RUN cd /gossaSrc && make
|
||||||
|
|
||||||
FROM alpine
|
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
|
EXPOSE 8001
|
||||||
|
RUN apk add --no-cache su-exec
|
||||||
COPY --from=builder /gossaSrc/gossa /gossa
|
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
|
% 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 🎉
|
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 🎉
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user