Replace the Dockerfile CMD from gunicorn to `python -m snek.app`, add MIT LICENSE.txt, populate pyproject.toml with project metadata and dependencies, refactor forms into `snek.form.login` and `snek.form.register` with new HTMLElement system, delete old `snek/forms.py`, add `snek/model/user.py` with User model, restructure `snek/app.py` imports and router setup to use new view modules, rename `styles.css` to `base.css` and strip comments, add `fancy-button.js` custom element, and update `compose.yml` entrypoint accordingly.
18 lines
326 B
Makefile
18 lines
326 B
Makefile
PYTHON=./.venv/bin/python
|
|
PIP=./.venv/bin/pip
|
|
APP=./.venv/bin/snek.serve
|
|
GUNICORN=./.venv/bin/gunicorn
|
|
GUNICORN_WORKERS = 1
|
|
PORT = 8081
|
|
|
|
|
|
install:
|
|
python3 -m venv .venv
|
|
$(PIP) install -e .
|
|
|
|
|
|
|
|
run:
|
|
$(GUNICORN) -w $(GUNICORN_WORKERS) -k aiohttp.worker.GunicornWebWorker snek.gunicorn:app --bind 0.0.0.0:$(PORT) --reload
|
|
|