Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
24c27e6feb | |||
1e33c6446d | |||
c44bb686e2 | |||
4b382b6ca8 | |||
dd3e30d968 | |||
5738e73ee8 | |||
cd35a002dd | |||
1b118cf0b7 |
@ -4,7 +4,7 @@
|
||||
"author": "Morgan",
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"tagline": "A modern client-server application for the Soulseek file-sharing network.",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.8",
|
||||
"healthCheckPath": "/health",
|
||||
"httpPort": 5030,
|
||||
"addons": {
|
||||
@ -21,4 +21,3 @@
|
||||
"music"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -1,43 +1,44 @@
|
||||
# 1) Télécharger et unzipper slskd
|
||||
FROM debian:bookworm-slim AS downloader
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
# -------- 1. Build stage: fetch latest slskd --------
|
||||
FROM debian:bookworm-slim AS build
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl ca-certificates unzip jq \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /tmp
|
||||
ARG TARGETPLATFORM
|
||||
RUN TAG=$(curl -fsSL https://api.github.com/repos/slskd/slskd/releases/latest \
|
||||
| jq -r '.tag_name') \
|
||||
&& case "${TARGETPLATFORM}" in \
|
||||
|
||||
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
|
||||
*) echo "Unsupported platform ${TARGETPLATFORM}" >&2; exit 1 ;; \
|
||||
esac && \
|
||||
curl -fsSL "$URL" -o slskd.zip && \
|
||||
unzip slskd.zip
|
||||
|
||||
# 2) Image finale
|
||||
# -------- 2. Runtime stage --------
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
tini jq ca-certificates gosu libstdc++6 \
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
tini gosu libstdc++6 \
|
||||
build-essential wget curl ca-certificates unzip jq rsync \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Créer les répertoires code, data et cache
|
||||
RUN mkdir -p /app/code /app/data /run/slskd/cache \
|
||||
&& useradd -u 1000 -m -d /app/data -s /bin/bash cloudron \
|
||||
&& chown -R cloudron:cloudron /app/data /run/slskd/cache
|
||||
# Minimal filesystem layout
|
||||
RUN mkdir -p /app/code /app/data /run/slskd/cache && \
|
||||
useradd -u 1000 -m -d /app/data -s /bin/bash cloudron && \
|
||||
chown -R cloudron:cloudron /app/data /run/slskd/cache
|
||||
|
||||
# Copier binaire + UI statique
|
||||
COPY --from=downloader /tmp/slskd /app/code/slskd
|
||||
COPY --from=downloader /tmp/wwwroot /app/code/wwwroot
|
||||
# Copy binaries + static UI
|
||||
COPY --from=build /tmp/slskd /app/code/slskd
|
||||
COPY --from=build /tmp/wwwroot /app/code/wwwroot
|
||||
|
||||
# Copier config example et script de démarrage
|
||||
# Config + startup
|
||||
COPY slskd.yml.example /app/code/slskd.yml.example
|
||||
COPY start.sh /app/code/start.sh
|
||||
|
||||
RUN chmod +x /app/code/slskd /app/code/start.sh \
|
||||
&& chown -R cloudron:cloudron /app/code
|
||||
RUN chmod +x /app/code/slskd /app/code/start.sh && \
|
||||
chown -R cloudron:cloudron /app/code
|
||||
|
||||
WORKDIR /app/code
|
||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||
|
10
patch.sh
10
patch.sh
@ -5,3 +5,13 @@ set -xeu
|
||||
./bump_version.sh patch
|
||||
./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,3 +28,19 @@ paths:
|
||||
downloads: /app/data/downloads
|
||||
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