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 # 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 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/ COPY production.yaml.example start.sh /app/pkg/
ENV NODE_ENV production ENV NODE_ENV production

View file

@ -2,7 +2,7 @@
set -eu set -eu
mkdir -p /app/data/storage mkdir -p /app/data/storage /run/peertube/cache
# do not rely on WORKDIR # do not rely on WORKDIR
cd /app/code/server cd /app/code/server
@ -81,7 +81,7 @@ else
[[ -n "${CLOUDRON_LDAP_SERVER:-}" ]] && update_ldap [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]] && update_ldap
fi fi
chown -R cloudron:cloudron /app/data chown -R cloudron:cloudron /app/data /run/peertube
echo "==> Starting PeerTube" echo "==> Starting PeerTube"
exec gosu cloudron:cloudron npm start exec gosu cloudron:cloudron npm start