Compare commits
No commits in common. "slskd" and "v1.0.4" have entirely different histories.
@ -4,7 +4,7 @@
|
|||||||
"author": "Morgan",
|
"author": "Morgan",
|
||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"tagline": "A modern client-server application for the Soulseek file-sharing network.",
|
"tagline": "A modern client-server application for the Soulseek file-sharing network.",
|
||||||
"version": "1.0.8",
|
"version": "1.0.3",
|
||||||
"healthCheckPath": "/health",
|
"healthCheckPath": "/health",
|
||||||
"httpPort": 5030,
|
"httpPort": 5030,
|
||||||
"addons": {
|
"addons": {
|
||||||
@ -21,3 +21,4 @@
|
|||||||
"music"
|
"music"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,44 +1,43 @@
|
|||||||
# -------- 1. Build stage: fetch latest slskd --------
|
# 1) Télécharger et unzipper slskd
|
||||||
FROM debian:bookworm-slim AS build
|
FROM debian:bookworm-slim AS downloader
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update \
|
||||||
curl ca-certificates unzip jq \
|
&& apt-get install -y --no-install-recommends \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
curl ca-certificates unzip jq \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
RUN TAG=$(curl -fsSL https://api.github.com/repos/slskd/slskd/releases/latest \
|
||||||
|
| jq -r '.tag_name') \
|
||||||
|
&& case "${TARGETPLATFORM}" in \
|
||||||
|
"linux/amd64") URL="https://github.com/slskd/slskd/releases/download/${TAG}/slskd-${TAG}-linux-x64.zip" ;; \
|
||||||
|
"linux/arm64") URL="https://github.com/slskd/slskd/releases/download/${TAG}/slskd-${TAG}-linux-arm64.zip" ;; \
|
||||||
|
*) echo "Unsupported PLATFORM: ${TARGETPLATFORM}" >&2; exit 1 ;; \
|
||||||
|
esac \
|
||||||
|
&& curl -fsSL "$URL" -o slskd.zip \
|
||||||
|
&& unzip slskd.zip
|
||||||
|
|
||||||
RUN TAG=$(curl -fsSL https://api.github.com/repos/slskd/slskd/releases/latest | jq -r '.tag_name') && \
|
# 2) Image finale
|
||||||
case "${TARGETPLATFORM}" in \
|
|
||||||
"linux/amd64") URL="https://github.com/slskd/slskd/releases/download/${TAG}/slskd-${TAG}-linux-x64.zip" ;; \
|
|
||||||
"linux/arm64") URL="https://github.com/slskd/slskd/releases/download/${TAG}/slskd-${TAG}-linux-arm64.zip" ;; \
|
|
||||||
*) echo "Unsupported platform ${TARGETPLATFORM}" >&2; exit 1 ;; \
|
|
||||||
esac && \
|
|
||||||
curl -fsSL "$URL" -o slskd.zip && \
|
|
||||||
unzip slskd.zip
|
|
||||||
|
|
||||||
# -------- 2. Runtime stage --------
|
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
tini jq ca-certificates gosu libstdc++6 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
# Créer les répertoires code, data et cache
|
||||||
tini gosu libstdc++6 \
|
RUN mkdir -p /app/code /app/data /run/slskd/cache \
|
||||||
build-essential wget curl ca-certificates unzip jq rsync \
|
&& useradd -u 1000 -m -d /app/data -s /bin/bash cloudron \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& chown -R cloudron:cloudron /app/data /run/slskd/cache
|
||||||
|
|
||||||
# Minimal filesystem layout
|
# Copier binaire + UI statique
|
||||||
RUN mkdir -p /app/code /app/data /run/slskd/cache && \
|
COPY --from=downloader /tmp/slskd /app/code/slskd
|
||||||
useradd -u 1000 -m -d /app/data -s /bin/bash cloudron && \
|
COPY --from=downloader /tmp/wwwroot /app/code/wwwroot
|
||||||
chown -R cloudron:cloudron /app/data /run/slskd/cache
|
|
||||||
|
|
||||||
# Copy binaries + static UI
|
# Copier config example et script de démarrage
|
||||||
COPY --from=build /tmp/slskd /app/code/slskd
|
COPY slskd.yml.example /app/code/slskd.yml.example
|
||||||
COPY --from=build /tmp/wwwroot /app/code/wwwroot
|
COPY start.sh /app/code/start.sh
|
||||||
|
|
||||||
# Config + startup
|
RUN chmod +x /app/code/slskd /app/code/start.sh \
|
||||||
COPY slskd.yml.example /app/code/slskd.yml.example
|
&& chown -R cloudron:cloudron /app/code
|
||||||
COPY start.sh /app/code/start.sh
|
|
||||||
|
|
||||||
RUN chmod +x /app/code/slskd /app/code/start.sh && \
|
|
||||||
chown -R cloudron:cloudron /app/code
|
|
||||||
|
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||||
|
10
patch.sh
10
patch.sh
@ -5,13 +5,3 @@ set -xeu
|
|||||||
./bump_version.sh patch
|
./bump_version.sh patch
|
||||||
./build.sh
|
./build.sh
|
||||||
|
|
||||||
# Met à jour la version dans CloudronManifest.json
|
|
||||||
jq --arg v "$(command cat VERSION)" '.version = $v' CloudronManifest.json > CloudronManifest.json.tmp && mv CloudronManifest.json.tmp CloudronManifest.json
|
|
||||||
|
|
||||||
# Commit + tag + push
|
|
||||||
git add VERSION CloudronManifest.json
|
|
||||||
git commit -m "chore: bump version to v$(command cat VERSION)"
|
|
||||||
git tag "v$(command cat VERSION)"
|
|
||||||
git push --follow-tags
|
|
||||||
git push origin --tags
|
|
||||||
|
|
||||||
|
@ -28,19 +28,3 @@ paths:
|
|||||||
downloads: /app/data/downloads
|
downloads: /app/data/downloads
|
||||||
incomplete: /app/data/incomplete
|
incomplete: /app/data/incomplete
|
||||||
|
|
||||||
shares:
|
|
||||||
directories:
|
|
||||||
- '/app/data/downloads'
|
|
||||||
filters:
|
|
||||||
- \.ini$
|
|
||||||
- Thumbs.db$
|
|
||||||
- \.DS_Store$
|
|
||||||
- \.bak$
|
|
||||||
- \.sync-conflict*$
|
|
||||||
- \.trashed*$
|
|
||||||
- \.nfo*$
|
|
||||||
- \.st*$
|
|
||||||
- \.txt$
|
|
||||||
- \.csv$
|
|
||||||
- \.torrent$
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user