mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-08-28 04:46:58 -04:00
last refactor
This commit is contained in:
+1
-1
Submodule gossa-ui updated: 8849f5d0d9...c30a3240b5
+2
-2
@@ -1,8 +1,8 @@
|
||||
# Caddy config
|
||||
# to enable https just set a valid/reachable domain instead of *:8002 - how simple !
|
||||
# to enable https just set a valid domain instead of mydomain.com - how simple !
|
||||
# authentication has been setup with 2 users, alice and bob
|
||||
|
||||
*:8002
|
||||
mydomain.com
|
||||
basicauth / alice paul
|
||||
basicauth / bob dylan
|
||||
proxy / 127.0.0.1:8001
|
||||
@@ -3,9 +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"
|
||||
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" HISTORY="true" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared"
|
||||
EXPOSE 8001
|
||||
RUN apk add --no-cache su-exec
|
||||
COPY --from=builder /gossaSrc/gossa /gossa
|
||||
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
|
||||
RUN echo -e 'exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} --history=${HISTORY} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} ${DATADIR}'>> /start.sh
|
||||
ENTRYPOINT [ "sh", "/start.sh" ]
|
||||
|
||||
@@ -7,5 +7,7 @@ RUN tar xvzf caddy.tar.gz && mv caddy /caddy
|
||||
|
||||
COPY Caddyfile /
|
||||
|
||||
RUN echo -e '/gossa -h 127.0.0.1 /shared & \n /caddy'>> /start.sh
|
||||
ENV UID="1000" GID="1000" HOST="127.0.0.1" PORT="8001" PREFIX="/" HISTORY="true" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared"
|
||||
EXPOSE 443
|
||||
RUN echo -e 'exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} --history=${HISTORY} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} ${DATADIR} & \n /caddy'>> /start.sh
|
||||
ENTRYPOINT [ "sh", "/start.sh" ]
|
||||
|
||||
+3
-6
@@ -8,10 +8,8 @@ the master branch is automatically built and pushed to [dockerhub](https://hub.d
|
||||
if you prefer building the image yourself :
|
||||
|
||||
```sh
|
||||
# build gossa within a build container, needs to be ran within the sources, ../ from here
|
||||
# build gossa within a build container, needs to be ran within the sources, ../ from here, and run
|
||||
% docker build -t gossa -f support/build.Dockerfile .
|
||||
|
||||
# and to run it simply
|
||||
% sudo docker run -v ~/LocalDirToShare:/shared -p 8001:8001 gossa
|
||||
```
|
||||
|
||||
@@ -20,10 +18,9 @@ the options are settable through environment variables that can be passed starti
|
||||
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 🎉
|
||||
|
||||
```sh
|
||||
# run with caddy, checkout the config in the dockerfile
|
||||
# checkout the caddy config, build, and run docker image
|
||||
% vim caddy.Dockerfile
|
||||
% docker build -t gossa-caddy -f caddy.Dockerfile .
|
||||
|
||||
# run with caddy
|
||||
% sudo docker run -v ~/LocalDirToShare:/shared --net=host gossa-caddy
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user