The below steps should work for any unix-based system (Linux, macOS). For windows, I need a volunteer to come up with those steps.
Before diving into the setup, a quick note about how the application is designed:
Although it uses a database, the site is actually 100% static. There's no runtime way to alter the database content, and every page is cached in production.
This means that when you make a change to the data, you simply wipe the database out and redo the "reset" process (see below) to regenerate your data.
PostgreSQL specifically is required due to the usage of [JSON data types](https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#jsonfield).
## Docker Setup
Docker can be used to simplify the setup of the infrastructure required to run the application locally.
Once you see `Starting development server at http://0.0.0.0:8000/` in the terminal output, you can open up that URL in your browser to see the local copy of the application running. It will say "docker" in the site title.
There's a hardcoded ten second wait in the service command; this is to ensure that the database container is ready before the application tries to run. If the wait isn't long enough, simply edit that line.
If any data changes are made, that volume will need to be deleted (note the `psql` container needs to be deleted first):
docker rm momw_psql_1
docker volume rm momw_psql-data
Then simply re-run `sudo make compose-up`.
## Manual Setup
These steps should work for any unix-based system (Linux, macOS).