Replace foreman with honcho

This commit is contained in:
Ryan Ahearn
2022-11-01 09:54:31 -04:00
parent 55bccecf10
commit db96c4d82f
4 changed files with 28 additions and 13 deletions

View File

@@ -20,6 +20,10 @@ bootstrap: ## Set up everything to run the app
bootstrap-with-docker: ## Build the image to run the app in Docker
docker build -f docker/Dockerfile -t notifications-api .
.PHONY: run-procfile
run-procfile:
pipenv run honcho start -f Procfile.dev
.PHONY: run-flask
run-flask: ## Run flask
pipenv run flask run -p 6011 --host=0.0.0.0

View File

@@ -77,6 +77,7 @@ requests-mock = "==1.9.3"
jinja2-cli = {version = "==0.8.2", extras = ["yaml"]}
pip-audit = "*"
bandit = "*"
honcho = "*"
[requires]
python_version = "3.9"

22
Pipfile.lock generated
View File

@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "f4f8c5db036bc6412ed4651902b4d8d5906fc920063bf0182933f3947959d120"
"sha256": "b1e61b613cb208ab42359fe335224367647de3b568adf4ed0872976d738a054b"
},
"pipfile-spec": 6,
"requires": {
@@ -963,10 +963,10 @@
},
"pytz": {
"hashes": [
"sha256:335ab46900b1465e714b4fda4963d87363264eb662aab5e65da039c25f1f5b22",
"sha256:c4d88f472f54d615e9cd582a5004d1e5f624854a6a27a6211591c251f22a6914"
"sha256:222439474e9c98fced559f1709d89e6c9cbf8d79c794ff3eb9f8800064291427",
"sha256:e89512406b793ca39f5971bc999cc538ce125c0e51c27941bef4568b460095e2"
],
"version": "==2022.5"
"version": "==2022.6"
},
"pyyaml": {
"hashes": [
@@ -1581,6 +1581,14 @@
"markers": "python_version >= '3.7'",
"version": "==3.1.29"
},
"honcho": {
"hashes": [
"sha256:a4d6e3a88a7b51b66351ecfc6e9d79d8f4b87351db9ad7e923f5632cc498122f",
"sha256:c5eca0bded4bef6697a23aec0422fd4f6508ea3581979a3485fc4b89357eb2a9"
],
"index": "pypi",
"version": "==1.1.0"
},
"html5lib": {
"hashes": [
"sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d",
@@ -1931,10 +1939,10 @@
},
"pytz": {
"hashes": [
"sha256:335ab46900b1465e714b4fda4963d87363264eb662aab5e65da039c25f1f5b22",
"sha256:c4d88f472f54d615e9cd582a5004d1e5f624854a6a27a6211591c251f22a6914"
"sha256:222439474e9c98fced559f1709d89e6c9cbf8d79c794ff3eb9f8800064291427",
"sha256:e89512406b793ca39f5971bc999cc538ce125c0e51c27941bef4568b460095e2"
],
"version": "==2022.5"
"version": "==2022.6"
},
"pyyaml": {
"hashes": [

View File

@@ -58,17 +58,19 @@ Our other repositories are:
# follow the instructions in .env
```
1. Run Flask
1. Run the web server and background worker
`make run-flask`
`make run-procfile`
1. Run Celery
1. Or run them individually:
`make run-celery`
* Run Flask (web server)
1. Or, run flask and celery together with [foreman](https://rubygems.org/gems/foreman)
`make run-flask`
`foreman start -f Procfile.dev`
* Run Celery (background worker)
`make run-celery`
### VS Code && Docker installation