Add honcho and just

This commit is contained in:
Jake Howard 2022-06-09 22:20:40 +01:00
parent da540a2abb
commit 56112a9655
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 35 additions and 4 deletions

1
Procfile Normal file
View file

@ -0,0 +1 @@
web: ./manage.py runserver

View file

@ -2,10 +2,12 @@
## Installation
1. Create a virtual environment
2. `pip install -r requirements.txt`
3. Create [`.env` file](#env-file)
4. `./manage.py runserver`
This project handles commands using [`just`](https://github.com/casey/just).
1. `just install`
2. Create [`.env` file](#env-file)
3. `just migrate`
4. `just start`
### `.env` file

3
dev-requirements.txt Normal file
View file

@ -0,0 +1,3 @@
-r requirements.txt
honcho==1.1.0

25
justfile Normal file
View file

@ -0,0 +1,25 @@
set dotenv-load
# Load virtualenv
export PATH := justfile_directory() + "/env/bin:" + env_var('PATH')
# Dev environment
export DEBUG := "true"
export SECRET_KEY := "super-secret-key"
# Recipes
@default:
just --list
install:
python -m venv env
pip install -r dev-requirements.txt
@start:
honcho start
@manage +ARGS:
./manage.py {{ ARGS }}
@collectstatic:
./manage.py collectstatic --noinput -v2