Django + React boilerplate is taken from https://github.com/mbrochh/django-reactjs-boilerplate Django uWSGI Docker is taken from https://github.com/dockerfiles/django-uwsgi-nginx
cd app
mkvirtualenv --python=`which python3` toongoose
pip install -r requirements.txt
npm install
mkdir database
./manage.py migrate
./manage.py runserver
node server.js
serves few static pages for now but ready for implementing apps with react.
- Build webpack for production
- change settings for production in
local_settings.py
- update
secret_key.txt
if needed - update
secret_email_key.txt
if needed - update
promocodes.txt
and makePROMOCODES_LIST
to read it - build docker
- push docker
- run docker in GCE
./node_modules/webpack/bin/webpack.js --config webpack.prod.config.js
Change settings in local_settings.py
Whole app is one Docker container, push it to google private registry
docker build -t toongoseny .
tag it
docker tag toongoseny gcr.io/toongoseny/toongosenyimage
push it
gcloud docker -- push gcr.io/toongoseny/toongosenyimage
don't set any permissons, it's private by default
Now create Google Compute Engine using startup-script.sh
- build localy
- export image
docker export ba838e435f7e > ../toongoseNY_docker.tar
- upload image to DO
- cat /home/toongoseNY_docker.tar | docker import - toongoseny:latest
- run
$VIRTUAL_ENV/bin/uwsgi --ini uwsgi.ini:local --virtualenv $VIRTUAL_ENV
python manage.py get_ses_statistics