31 lines
557 B
Makefile
31 lines
557 B
Makefile
# =====CONFIG=====
|
|
PYTHON := python3
|
|
VENV := .venv
|
|
|
|
|
|
# =====RECIPES=====
|
|
# Create the virtual environment
|
|
$(VENV)/bin/activate: setup.py
|
|
'$(PYTHON)' -m venv '$(VENV)'
|
|
'$(VENV)/bin/pip' install -r requirements.txt
|
|
|
|
venv: $(VENV)/bin/activate
|
|
.PHONY: venv
|
|
|
|
# Remove any temporary files
|
|
clean:
|
|
@ rm -rf '$(VENV)'
|
|
.PHONY: clean
|
|
|
|
run:
|
|
@ API_KEY=test REPO_DIR=data '$(VENV)/bin/flask' run
|
|
.PHONY: run
|
|
|
|
gunicorn:
|
|
@ API_KEY=test REPO_DIR=data '$(VENV)/bin/gunicorn' app:app
|
|
.PHONY: gunicorn
|
|
|
|
image:
|
|
@ docker build -t chewingbever/arch-repo .
|
|
.PHONY: image
|