this project contains the source for the sail-lanier.com website.
create a python venv
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txtdocker build -t sail_lanier . # add --no-cache to force a complete rebuildset up an alias to easily launch the docker container:
alias sail_lanier-shell='docker run -ti -e AWS_PROFILE=sail_lanier -v ~/projects/sail_lanier/sail_lanier/:/var/task -v ~/.aws/:/root/.aws -p 127.0.0.1:8000:8000 --rm sail_lanier'run the shell
sail_lanier-shellnote that you must run . venv/bin/activate before interacting with manage.py
create a database
./manage.py migrate --settings=sail_lanier.settings.baseadd an admin user
./manage.py createsuperuser --settings=sail_lanier.settings.basecd sail_lanier
./manage.py runserver --settings=sail_lanier.settings.base 0.0.0.0:8000 # remove 0.0.0.0:8000 to only listen on localhostif everything goes as planned your site should be available on http://127.0.0.1:8000/
in order to manage the production and development instance, you must have AWS IAM credentials and the prod.py or
dev.py config file.
to update the lambda function
zappa update prodto update static files
AWS_PROFILE=sail-lanier ./manage.py collectstatic --settings=sail_lanier.settings.dev
AWS_PROFILE=sail-lanier ./manage.py collectstatic --settings=sail_lanier.settings.prodto vacuum sqlite
zappa manage prod s3_sqlite_vacuumbefore upgrading Django version, run
python -Wa manage.py test --settings=sail_lanier.settings.basetechnologies this project makes use of: