Helm chart for deploying Peertube on kubernetes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
921 B

  1. #!/bin/sh
  2. # Populate config directory
  3. if [ -z "$(ls -A /config)" ]; then
  4. cp /app/support/docker/production/config/* /config
  5. fi
  6. # Always copy default and custom env configuration file, in cases new keys were added
  7. cp /app/config/default.yaml /config
  8. cp /app/support/docker/production/config/custom-environment-variables.yaml /config
  9. # From 5.2 peertube upgrade script creates a production.yaml.new containing production.yml config and news mandatory keys, directly usable
  10. if [ -f "/config/production.yaml.new" ]; then
  11. mv /config/production.yaml.new /config/production.yaml
  12. fi
  13. # Patch user after the cp
  14. find /config ! -user peertube -exec chown peertube:peertube {} \;
  15. # Move videos data for Peertube 6.0.0 before starting peertube
  16. if [ -d "/data/videos" -a ! -d "/data/web-videos" ]; then
  17. mv /data/videos /data/web-videos
  18. fi
  19. # Prepare assets for the Nginx sidecar
  20. cp -r /app/client/dist/* /assets/
  21. exit 0