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