fix: Copy the client assets over to a named volume at runtime

This commit makes the entrypoint copy the client's dist files to
the mountpoint of the app-assets named volume. That way, changed
files are made available to the nginx container when the peertube
image gets updated

Closes: #8
This commit is contained in:
mirsal 2021-07-16 21:03:02 +00:00
parent 99011f0df7
commit e310d86a8f
2 changed files with 5 additions and 1 deletions

View File

@ -51,7 +51,7 @@ services:
volumes:
- app-data:/data
- app-config:/config
- app-assets:/app/client/dist
- app-assets:/srv/client/dist
secrets:
- db_password
configs:

View File

@ -30,6 +30,10 @@ if [ -z "$PEERTUBE_SMTP_ENABLED" ]; then
file_env "PEERTUBE_SMTP_PASSWORD"
fi
# Copy the client files over to a named volume
# so that they may be served by nginx directly
cp -ar /app/client/dist /srv/client
# upstream entrypoint
# https://github.com/Chocobozzz/PeerTube/blob/66f77f63437c6774acbd72584a9839a7636ea167/support/docker/production/entrypoint.sh
/usr/local/bin/entrypoint.sh "$@"