mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-09-01 22:57:43 -04:00
maintain state
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# Caddy config
|
||||
# to enable https just set a valid/reachable domain instead of *:8002 - how simple !
|
||||
# authentication has been setup with 2 users, alice and bob
|
||||
|
||||
*:8002
|
||||
basicauth / alice paul
|
||||
basicauth / bob dylan
|
||||
proxy / 127.0.0.1:8001
|
||||
@@ -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,11 @@
|
||||
FROM pldubouilh/gossa
|
||||
|
||||
# download and prepare caddy
|
||||
RUN apk update && apk add curl ca-certificates
|
||||
RUN curl -L -o caddy.tar.gz "https://github.com/caddyserver/caddy/releases/download/v1.0.3/caddy_v1.0.3_linux_amd64.tar.gz"
|
||||
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
|
||||
ENTRYPOINT [ "sh", "/start.sh" ]
|
||||
@@ -0,0 +1,16 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
gossa-server:
|
||||
image: pldubouilh/gossa
|
||||
container_name: gossa
|
||||
restart: always
|
||||
ports:
|
||||
- 8001:8001
|
||||
volumes:
|
||||
- ~/to-share:/shared
|
||||
# labels:
|
||||
# - "traefik.enable=true"
|
||||
# - "traefik.port=8001"
|
||||
# - "traefik.backend=gossa"
|
||||
# - "traefik.frontend.rule=Host:${GOSSA}.${DOMAIN}"
|
||||
@@ -0,0 +1,29 @@
|
||||
the master branch is automatically built and pushed to [dockerhub](https://hub.docker.com/r/pldubouilh/gossa) under `pldubouilh/gossa`.
|
||||
|
||||
```sh
|
||||
# pull from dockerhub and run
|
||||
% sudo docker run -v ~/LocalDirToShare:/shared -p 8001:8001 pldubouilh/gossa
|
||||
```
|
||||
|
||||
if you prefer building the image yourself :
|
||||
|
||||
```sh
|
||||
# build gossa within a build container, needs to be ran within the sources, ../ from here
|
||||
% docker build -t gossa -f support/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-caddy -f caddy.Dockerfile .
|
||||
|
||||
# run with caddy
|
||||
% sudo docker run -v ~/LocalDirToShare:/shared --net=host gossa-caddy
|
||||
```
|
||||
|
||||
a docker-compose example image is also provided. running docker compose should be straightforward : `docker-compose up .` have a look in `docker-compose.yml` for further configuration.
|
||||
Reference in New Issue
Block a user