Configure for docker compose

This commit is contained in:
Ben Sarmiento
2023-10-20 19:32:53 +02:00
parent cd6b94f868
commit e361807119
3 changed files with 62 additions and 0 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
# Build stage
FROM golang:1-alpine AS builder
WORKDIR /app
COPY . .
RUN CGO_ENABLED=0 go build -o zurg cmd/zurg/main.go
# Obfuscation stage
FROM alpine:3 AS obfuscator
WORKDIR /app
COPY --from=builder /app/zurg .
RUN apk add --no-cache upx
RUN upx --brute zurg
# Final stage
FROM alpine:3
WORKDIR /app
COPY --from=obfuscator /app/zurg .
ENTRYPOINT ["./zurg"]

40
docker-compose.yml Normal file
View File

@@ -0,0 +1,40 @@
version: '3.8'
services:
zurg:
image: debridmediamanager/zurg:latest
restart: unless-stopped
ports:
- 9999:9999
volumes:
- ./config.yml:/app/config.yml
- zurgdata:/app/data
rclone:
image: rclone/rclone:latest
restart: unless-stopped
environment:
TZ: Europe/Berlin
PUID: 1000
PGID: 1000
volumes:
- type: bind
source: ./media
target: /data
bind:
propagation: shared
- ./rclone.conf:/config/rclone/rclone.conf
- /dev/fuse:/dev/fuse
cap_add:
- SYS_ADMIN
- MKNOD
privileged: true
security_opt:
- apparmor:unconfined
- no-new-privileges:true
devices:
- /dev/fuse:/dev/fuse:rwm
command: "mount zurg: /data --allow-other --allow-non-empty --uid 1000 --gid 1000 --dir-cache-time 1s --read-only --log-level DEBUG"
volumes:
zurgdata:

4
rclone.conf Normal file
View File

@@ -0,0 +1,4 @@
[zurg]
type = webdav
url = http://zurg:9999
vendor = other