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
This commit is contained in:
Girish Ramakrishnan 2022-05-12 11:22:44 -07:00
parent 3eb43da9db
commit c91747cee4
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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