To use this template:
git clone https://github.com/doubletapp/django-project-template.git project_namecd project_name && rm -rf .gitgit remote add origin your-project-git- Replace all occurrences of
project_namein code with your project name make rclone_pluginmake dotenv f=.env- Set
ENVvariable in .env file. Available variants are:prod,dev,test - Fill your AWS info in
.envfile (more info in FILL_AWS_INFO section) - Remove Template section from README.md
- add new dependency to Pipfile (paste from PyPi)
- run
make piplockto update Pipfile.lock with new deps - next
make buildwill use new deps
make logs c=nginx p=-f
make logs c=nginx p='--since="2021-02-11 05:04:00" --until="2021-02-11 05:05:00"'
- Edit
swagger/api-doc.yml - Build swagger with
make swagger_build - Run swagger locally with
make swagger_dev - Open http://127.0.0.1:8080/swagger/
make jwt e=user@test.com
make dotenv
make dotenv f=.env
IMAGE_DB=project_name__db
IMAGE_APP=project_name__app
IMAGE_NGINX=project_name__nginx
IMAGE_SWAGGER=project_name__swagger
AWS_PROVIDER=<One of "DigitalOcean" or "AWS">
AWS_ACCESS_KEY_ID=<YOUR_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<YOUR_SECRET_ACCESS_KEY>
AWS_STORAGE_BUCKET_NAME=<BUCKET_NAME_TO_MOUNT>
AWS_LOCATION=<AWS_LOCATION>
AWS_S3_PATH=<AWS_BUCKET_PREFIX>
- Example for DigitalOcean provider:
fra1. You may see other locations in documentation. - Example for AWS provider:
eu-west-2. You may see other locations in documentation.
mkdir .vscode
cp launch.example.json .vscode/launch.json
# (!) make sure that you're using DEBUG=True in settings.py
make dev
# open "Run and Debug" tab in VS Code
# press "Start Debugging"