Skip to content

Instantly share code, notes, and snippets.

@russelldavies
Created April 4, 2019 18:23
Show Gist options
  • Save russelldavies/d806b21af1c590b51274ddc0a4443df8 to your computer and use it in GitHub Desktop.
Save russelldavies/d806b21af1c590b51274ddc0a4443df8 to your computer and use it in GitHub Desktop.
Zappa AWS CodeBuild
version: 0.2
phases:
install:
commands:
- virtualenv venv
- source venv/bin/activate
- pip install -r requirements.txt
pre_build:
commands:
- if [ ! -v STAGE ]; then echo stage not set; exit 1; fi
- zappa manage --no-color $STAGE "collectstatic --noinput"
build:
commands:
- zappa update --disable_progress $STAGE
post_build:
commands:
- if [ $CODEBUILD_BUILD_SUCCEEDING = 0 ]; then zappa rollback $STAGE -n 1; exit 1; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment