docker-compose build
- build everything needed for local development.docker-compose up web
- start Django development container. It should automatically reload when code change.bin/manage.sh
- run any and all of your Django command in production, beta, staging or local environment. Seebin/manage.sh -h
for detail usage.
bin/test.sh
- run all tests in Django development container.bin/coverage.sh
- run all tests and print code coverage in Django development container.
Environment Variables
SKIP_COVERALLS
: set totrue
to skip sending coverage report to Coveralls. Only do this if Coveralls is down.$SKIP_REBUILD_INDEX
: set totrue
to skip rebuild index. This will significantly reduce deployment time. Please make sure that no changes in database was made.$SKIP_REBUILD_SEARCH_INDEX
: set totrue
to skip rebuild search index. This will significantly reduce deployment time. Please make sure that no changes in database was made.
Deployment should be almost automatic depending on which branch you pushed.
master
branch push will trigger production deploybeta
branch push will trigger beta deploystaging
branch push will trigger staging deploy
Staging deployment is completely automated but production deployment require your approval (to proceed) between django_migrate
step and rebuild_index
step so that you have the chance to run a command that alter data such as cache_data
.
If you want to see each step, look at .circleci/config.yml
.
- Read Kubernetes guides
git secret reveal
bin/initialize_kubernetes_cluster.sh
- again only run this when cluster is newly created.bin/initialize_kubernetes_namespace.sh
.
- Run
bin/run_cronjob.sh
to run individual cronjobs e.g.bin/run_cronjob.sh --staging update_documents 0 5 * * * latest
. Checkbin/run_cronjob.sh -h
for usage. - Kubernetes uses UTC so we have to +5 to match with Chicago time zone.
- Do not use @daily as it will makes the cronjobs run at 19:00 CDT.
- Use
bin/run_job.sh
e.g.bin/run_job.sh --staging latest cache_data
. Checkbin/run_job.sh -h
for usage.
- Install hercule
- Run
bin/build_apiary.sh
to update apiary file.