What’s in this repo…
.
├── README.md # You're reading me!
│
├── Makefile # Setup, linting, and common commands here.
│
├── pyproject.toml # Python dependendencies and linter settings.
├── poetry.lock # Dependency lock file, this gets updated programatically by poetry.
│
├── settings.toml # Application environment variables.
├── secrets.toml # SECRET application environment variables (NOT IN GIT!)
│
├── app.py # The primary python source file. The backend is (mostly) here.
├── templates
│ └── index.html # The primary html jinja template. The front-end is (mostly) here.
├── static
│ ├── app.js # The js source file to accompany index.html.
│ ├── app.css # The css source file to accompany index.html.
│ └── themes # Themes for the events. Only one of this is used at a time.
│
├── migrations # Generated migrations (see below).
└── instance # SQLite Databases for local development.
First step is setting up your python env and development DB with the Makefile.
smol-party-3.10.14.python-version fileinstance/make setup
Next you’ll need to set up a secrets.toml in the root directory with the necessary secrets for development.
It should look something like this:
[default]
TWILIO_ACCOUNT_SID = ""
TWILIO_AUTH_TOKEN = ""
[development]
SECRET_KEY = "e5bbe2b2c0a1052543f93eea3595735e"
SQLALCHEMY_DATABASE_URI = 'sqlite:///development.db'
Runs in debug mode with FLASK_ENV=development and will use environment
variables from the [development] seconds of the settings.toml and
secrets.toml files.
make up
Create a new migration based on prod.
FLASK_ENV=production-local poetry run flask db migrate -m "New migration."
Apply it locally.
poetry run flask db upgrade
Apply it in prod.
FLASK_ENV=production-local poetry run flask db upgrade