Create a python3 virtual environment (3.9.6):
python -m venv /path/to/make/venv
Use that virtual environment (must activate every time you open a new prompt)
/path/to/venv/Scripts/activate
. /path/to/venv/bin/activate
Install requirements (If you add packages with pip, add them to requirements.txt using "pip freeze > requirements.txt"). If running on linux or mac, remove the line for Twisted from the requirements.txt file (dont commit this change)
pip install -r requirements.txt
Install PostgreSQL and set up a local database.
Create a .env file in the root directory of the repository and populate it with the following, filling in as necessary with information from your Postgres install. Set DJANGO_SECRET_KEY
as anything, since it doesn't matter for local development, but if you want to generate one properly execute the python code below the example .env file:
DJANGO_SECRET_KEY=
DB_USER=
DB_NAME=
DB_PASS=
DB_HOST=
DB_PORT=
python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
Apply the schema to the database:
python manage.py migrate
Create a superuser account to use on your local development server:
python manage.py createsuperuser
Run the server:
python manage.py runserver
You can now access all the pages at localhost e.g. http://127.0.0.1:8000/search/
Edit docker-compose.yml
to setup the database
Ensure .env
is setup.
DJANGO_SECRET_KEY=(Run the command above to get this)
DB_USER=fowsim
DB_NAME=fowsim
DB_PASS=CHANGEME
DB_HOST=db
DB_PORT=5432
Run docker-compose up -d --build
Setup database running this command:
docker-compose exec web python manage.py migrate --noinput
Create the superuser:
docker-compose exec web python manage.py createsuperuser
Head to http://localhost:1337
to enjoy the docker setup :D
Join us on Discord and let us know about your interest in helping develop Force of Wind!
For approved contributors, see here for info on specific info on how to contribute.