.ebextensions/01_app.config
packages:
yum:
freetype-devel: []
gcc: []
gcc-c++: []
glibc-devel: []
make: []
patch: []
postgresql-devel: []
zlib-devel: []
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: "hamlet.wsgi:application"
aws:elasticbeanstalk:application:environment:
DJANGO_SETTINGS_MODULE: "hamlet.settings.aws"
PYTHONPATH: "/var/app/current:$PYTHONPATH"
MODELS_DIR: "/models"
S3_MODELS_BUCKET: "s3://hamlet-model-files/"
aws:elasticbeanstalk:environment:proxy:staticfiles:
/static: staticfiles
commands:
05_build_essentials:
command: "yum groupinstall 'Development Tools' -y"
container_commands:
01_create_models_dir:
command: "mkdir --mode=755 ${MODELS_DIR}"
test: '[ ! -d "${MODELS_DIR}" ]'
02_sync_models_stored_in_s3:
command: "aws s3 sync ${S3_MODELS_BUCKET} ${MODELS_DIR}"
03_migrate:
command: "source /var/app/venv/*/bin/activate && python manage.py migrate --noinput"
leader_only: true
04_collectstatic:
command: "source /var/app/venv/*/bin/activate && python manage.py collectstatic --noinput"
leader_only: true
04_compress:
command: "source /var/app/venv/*/bin/activate && python manage.py compress"
leader_only: true