From c91747cee4bfd9994d855a6c6b12317c018b4d79 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 12 May 2022 11:22:44 -0700 Subject: [PATCH] symlink cache directory this helps when installing plugins which use node-gyp https://forum.cloudron.io/topic/4221/trying-to-import-a-whole-yt-channel-via-cli --- Dockerfile | 3 +++ start.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29d8832..072c779 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,9 @@ RUN ln -sf /app/data/production.yaml /app/code/server/config/production.yaml && # youtube-dl RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && chmod +x /usr/local/bin/youtube-dl +# required when installing plugins/themes that use node-gyp +RUN rm -rf /home/cloudron/.cache && ln -s /run/peertube/cache /home/cloudron/.cache + COPY production.yaml.example start.sh /app/pkg/ ENV NODE_ENV production diff --git a/start.sh b/start.sh index 6ad486b..692bbc7 100755 --- a/start.sh +++ b/start.sh @@ -2,7 +2,7 @@ set -eu -mkdir -p /app/data/storage +mkdir -p /app/data/storage /run/peertube/cache # do not rely on WORKDIR cd /app/code/server @@ -81,7 +81,7 @@ else [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]] && update_ldap fi -chown -R cloudron:cloudron /app/data +chown -R cloudron:cloudron /app/data /run/peertube echo "==> Starting PeerTube" exec gosu cloudron:cloudron npm start