mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-08-29 13:27:02 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1613a08e8 | ||
|
|
99ac521aa8 | ||
|
|
f1dc8280f5 |
@@ -6,10 +6,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.17.3
|
- name: Set up Go 1.18
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.3
|
go-version: 1.18
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
FROM golang:latest as builder
|
FROM golang:1.18 as builder
|
||||||
COPY . /gossaSrc
|
COPY . /gossaSrc
|
||||||
RUN cd /gossaSrc && make
|
RUN cd /gossaSrc && make
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine:3.15
|
||||||
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared" READONLY="false"
|
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared" READONLY="false" VERB="false"
|
||||||
EXPOSE 8001
|
|
||||||
RUN apk add --no-cache su-exec
|
RUN apk add --no-cache su-exec
|
||||||
|
COPY ./support/entrypoint.sh /entrypoint.sh
|
||||||
COPY --from=builder /gossaSrc/gossa /gossa
|
COPY --from=builder /gossaSrc/gossa /gossa
|
||||||
RUN echo -e 'exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} -ro=${READONLY} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} ${DATADIR}'>> /start.sh
|
ENTRYPOINT "/entrypoint.sh"
|
||||||
ENTRYPOINT [ "sh", "/start.sh" ]
|
|
||||||
|
|||||||
Executable
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} -ro=${READONLY} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} --verb=${VERB} ${DATADIR}
|
||||||
+2
-2
@@ -3,9 +3,9 @@ Description=Gossa service for mytestfolder
|
|||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
# note: its better to use absolute paths here
|
# note: absolute paths are necessary here
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=gossa /home/joe/mytestfolder
|
ExecStart=/usr/bin/gossa /home/joe/mytestfolder
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user