mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-09-01 22:57:43 -04:00
@@ -1,4 +0,0 @@
|
|||||||
FROM alpine
|
|
||||||
EXPOSE 8001
|
|
||||||
COPY gossa /gossa
|
|
||||||
ENTRYPOINT [ "/gossa", "-h", "0.0.0.0", "/shared" ]
|
|
||||||
@@ -26,7 +26,7 @@ ci-watch:
|
|||||||
|
|
||||||
build-all:
|
build-all:
|
||||||
make embed
|
make embed
|
||||||
env GOOS=linux GOARCH=amd64 go build gossa.go
|
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build gossa.go
|
||||||
mv gossa gossa-linux64
|
mv gossa gossa-linux64
|
||||||
env GOOS=linux GOARCH=arm go build gossa.go
|
env GOOS=linux GOARCH=arm go build gossa.go
|
||||||
mv gossa gossa-linux-arm
|
mv gossa gossa-linux-arm
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
FROM golang:latest as builder
|
||||||
|
COPY . /gossaSrc
|
||||||
|
RUN cd /gossaSrc && make
|
||||||
|
|
||||||
|
FROM alpine
|
||||||
|
EXPOSE 8001
|
||||||
|
COPY --from=builder /gossaSrc/gossa /gossa
|
||||||
|
ENTRYPOINT [ "/gossa", "-h", "0.0.0.0", "/shared" ]
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
FROM alpine
|
||||||
|
|
||||||
|
# download and prepare caddy
|
||||||
|
RUN apk update && apk add curl ca-certificates
|
||||||
|
RUN curl -L -o caddy.tar.gz "https://github.com/mholt/caddy/releases/download/v0.11.1/caddy_v0.11.1_linux_amd64.tar.gz"
|
||||||
|
RUN tar xvzf caddy.tar.gz && mv caddy /caddy
|
||||||
|
|
||||||
|
# download and prepare gossa
|
||||||
|
RUN curl -L -o /gossa "https://github.com/pldubouilh/gossa/releases/download/v0.0.4/gossa-linux64"
|
||||||
|
RUN chmod +x /gossa /caddy
|
||||||
|
|
||||||
|
# Caddy config:
|
||||||
|
# * http basic auth is implemented here, with bob as user and dylan as password
|
||||||
|
# * to enable https just set a valid domain instead of *:8001 - how simple !
|
||||||
|
RUN echo -e '\n\
|
||||||
|
*:8001\n\
|
||||||
|
basicauth / bob dylan\n\
|
||||||
|
proxy / 127.0.0.1:8000\n\
|
||||||
|
'>> /Caddyfile
|
||||||
|
|
||||||
|
RUN echo -e '/gossa -h 127.0.0.1 -p 8000 /shared & \n /caddy'>> /start.sh
|
||||||
|
ENTRYPOINT [ "sh", "/start.sh" ]
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
FROM alpine
|
||||||
|
EXPOSE 8001
|
||||||
|
RUN wget https://github.com/pldubouilh/gossa/releases/download/v0.0.4/gossa-linux64 && mv gossa-linux64 /gossa && chmod +x /gossa
|
||||||
|
ENTRYPOINT [ "/gossa", "-h", "0.0.0.0", "/shared" ]
|
||||||
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
```sh
|
||||||
|
# download latest gossa release
|
||||||
|
docker build -t gossa -f download.Dockerfile .
|
||||||
|
|
||||||
|
# ... or build gossa within a build container, needs to be ran within the sources, ../ from here
|
||||||
|
docker build -t gossa -f docker/build.Dockerfile .
|
||||||
|
|
||||||
|
# and to run it simply
|
||||||
|
sudo docker run -v ~/LocalDirToShare:/shared -p 8001:8001 gossa
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
docker build -t gossa -f caddy.Dockerfile .
|
||||||
|
|
||||||
|
# run with caddy
|
||||||
|
sudo docker run -v ~/LocalDirToShare:/shared --net=host gossa
|
||||||
|
```
|
||||||
|
|
||||||
@@ -52,13 +52,14 @@ make
|
|||||||
|drag-and-drop external item | upload file/folders|
|
|drag-and-drop external item | upload file/folders|
|
||||||
|
|
||||||
### using with docker
|
### using with docker
|
||||||
a pretty short docker file is provided
|
multiple dockerfiles are provided in the `docker` folder. to simply get started just have a look below
|
||||||
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# build docker image
|
# build
|
||||||
make
|
cd docker
|
||||||
docker build -t gossa .
|
docker build -t gossa -f download .
|
||||||
|
|
||||||
# run
|
# run
|
||||||
sudo docker run -v ~/ToShare:/shared -p 8001:8001 gossa
|
sudo docker run -v ~/LocalDirToShare:/shared -p 8001:8001 gossa
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user