A basic container for a private MediaGoblin media server.
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.

run.sh 668B

1234567891011121314151617
  1. #!/bin/bash
  2. set -e
  3. # Based on environment variable values, replace placeholders in MediaGoblin configuration.
  4. envsubst < /app/mediagoblin_local.ini.template > /app/mediagoblin_local.ini
  5. chown mediagoblin.www-data /app/mediagoblin_local.ini
  6. su - mediagoblin --command "cd /app && gmg dbupdate"
  7. # Wait for the database to come up.
  8. database_host=$(echo $DATABASE_URL | cut -d @ -f 2 | cut -d / -f 1)
  9. /sbin/wait-for ${database_host}:5432
  10. # Run uWSGI and Nginx.
  11. chown mediagoblin.www-data /app/user_dev
  12. /usr/bin/uwsgi --uid mediagoblin --gid www-data --master --workers 3 /etc/uwsgi/apps-enabled/mediagoblin.yaml \
  13. & /usr/sbin/nginx -g 'daemon off; master_process on;'