Fix Log file permissions
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -17,11 +17,20 @@ ADD . .
|
|||||||
# Build
|
# Build
|
||||||
RUN CGO_ENABLED=0 GOOS=$(echo $TARGETPLATFORM | cut -d '/' -f1) GOARCH=$(echo $TARGETPLATFORM | cut -d '/' -f2) go build -ldflags="-X github.com/sirrobot01/debrid-blackhole/pkg/version.Version=${VERSION} -X github.com/sirrobot01/debrid-blackhole/pkg/version.Channel=${CHANNEL}" -o /blackhole
|
RUN CGO_ENABLED=0 GOOS=$(echo $TARGETPLATFORM | cut -d '/' -f1) GOARCH=$(echo $TARGETPLATFORM | cut -d '/' -f2) go build -ldflags="-X github.com/sirrobot01/debrid-blackhole/pkg/version.Version=${VERSION} -X github.com/sirrobot01/debrid-blackhole/pkg/version.Channel=${CHANNEL}" -o /blackhole
|
||||||
|
|
||||||
|
FROM alpine as logsetup
|
||||||
|
RUN mkdir -p /logs && \
|
||||||
|
touch /logs/decypharr.log && \
|
||||||
|
chown -R 1000:1000 /logs && \
|
||||||
|
chmod -R 755 /logs && \
|
||||||
|
chmod 666 /logs/decypharr.log
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
COPY --from=builder /blackhole /blackhole
|
COPY --from=builder /blackhole /blackhole
|
||||||
COPY --from=builder /app/README.md /README.md
|
COPY --from=builder /app/README.md /README.md
|
||||||
ENV LOG_PATH=/app/logs
|
COPY --from=logsetup /logs /logs
|
||||||
|
|
||||||
|
ENV LOG_PATH=/logs
|
||||||
|
|
||||||
EXPOSE 8181 8282
|
EXPOSE 8181 8282
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ services:
|
|||||||
- "8181:8181" # Proxy
|
- "8181:8181" # Proxy
|
||||||
user: "1000:1000"
|
user: "1000:1000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs/:/app/logs
|
|
||||||
- /mnt/:/mnt
|
- /mnt/:/mnt
|
||||||
- ~/plex/configs/blackhole/config.json:/app/config.json # Config file, see below
|
- ~/plex/configs/blackhole/config.json:/app/config.json # Config file, see below
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user