Skip to content

Instantly share code, notes, and snippets.

@dlrust
Created July 30, 2013 22:05
Show Gist options
  • Save dlrust/6117468 to your computer and use it in GitHub Desktop.
Save dlrust/6117468 to your computer and use it in GitHub Desktop.
container_commands:
01_syncdb:
command: "django-admin.py syncdb --noinput"
leader_only: true
02_createadmin:
command: "bin/createadmin.py"
leader_only: true
03_migrate_myapp:
command: "./manage.py migrate --noinput --merge"
leader_only: true
04_fixtures:
command: "./manage.py loaddata persona/main/fixtures/socialapps_dev.json"
05_collectstatic:
command: "django-admin.py collectstatic --noinput"
option_settings:
"aws:elasticbeanstalk:container:python:environment":
DJANGO_SETTINGS_MODULE: "persona.settings"
"aws:elasticbeanstalk:container:python":
WSGIPath: "persona/wsgi.py"
"aws:elasticbeanstalk:container:python:staticfiles":
"/static/": "static/"
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_start_celery":
mode: "000777"
content: |
cd /opt/python/current/app/
if [ -f /opt/python/current/app/celeryd.pid ]
then
kill -TERM `cat /opt/python/current/app/celeryd.pid`
rm -rf /opt/python/current/app/celeryd.pid
fi
source /opt/python/run/venv/bin/activate
sleep 10
./manage.py celeryd_detach worker --pidfile=/opt/python/current/app/celeryd.pid --loglevel=info --logfile=/var/log/httpd/error_log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment