From b30f86f7d04b09614e55602e6c9c222332434b64 Mon Sep 17 00:00:00 2001 From: forest Date: Thu, 21 May 2020 19:39:06 -0500 Subject: [PATCH] update readme to explain how to use .env file --- README.md | 13 ++++++++++--- capsulflask/schema_migrations/03_down_openbsd67.sql | 4 +++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8823825..51483bf 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,16 @@ Run an instance of Postgres (I used docker for this, you can use whatever you wa docker run --rm -it -e POSTGRES_PASSWORD=dev -p 5432:5432 postgres ``` -Modify the default email settings +Create a `.env` file to set up the application configuration: ``` -nano capsulflask/__init__.py +nano .env +``` + +Enter your SMTP credentials like this: +``` +MAIL_USERNAME=forest@nullhex.com +MAIL_PASSWORD=************** ``` Run the app @@ -43,7 +49,8 @@ Run the app pipenv run flask run ``` -Run the app in gunicorn +Run the app in gunicorn: + ``` pipenv run gunicorn --bind 127.0.0.1:5000 app:app ``` diff --git a/capsulflask/schema_migrations/03_down_openbsd67.sql b/capsulflask/schema_migrations/03_down_openbsd67.sql index 94e2b80..b40fa45 100644 --- a/capsulflask/schema_migrations/03_down_openbsd67.sql +++ b/capsulflask/schema_migrations/03_down_openbsd67.sql @@ -1,4 +1,6 @@ DELETE FROM os_images WHERE id = 'openbsd67'; ALTER TABLE os_images -DROP COLUMN deprecated; \ No newline at end of file +DROP COLUMN deprecated; + +UPDATE schemaversion SET version = 2; \ No newline at end of file