From d8044a7c769d33efd3e4c1bcd46d24383ac75b60 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Mon, 20 Jun 2022 12:27:32 +0100 Subject: [PATCH 1/3] Make config production ready --- ref-test/app/config.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ref-test/app/config.py b/ref-test/app/config.py index 48aa4f1..c965410 100644 --- a/ref-test/app/config.py +++ b/ref-test/app/config.py @@ -1,9 +1,7 @@ import os from pathlib import Path - -if not os.getenv('DATA'): - from dotenv import load_dotenv - load_dotenv('../.env') +from dotenv import load_dotenv +load_dotenv('../.env') class Config(object): APP_HOST = '0.0.0.0' From d9962f18edad5e0ae8123713472aa5365fe9ed76 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Mon, 20 Jun 2022 12:28:00 +0100 Subject: [PATCH 2/3] Production ready v.0.2.1 --- ref-test/app/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ref-test/app/__init__.py b/ref-test/app/__init__.py index 60c082d..75af4ba 100644 --- a/ref-test/app/__init__.py +++ b/ref-test/app/__init__.py @@ -1,4 +1,4 @@ -from .config import Development as Config +from .config import Production as Config from .install import install_app from .models import User from .extensions import bootstrap, csrf, db, login_manager, mail From 1ef34465c2c298ecb05ea4e26580a5e9b23bc279 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Mon, 20 Jun 2022 12:53:40 +0100 Subject: [PATCH 3/3] Debug install script --- install-script.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install-script.sh b/install-script.sh index 5d89054..e7d9f25 100644 --- a/install-script.sh +++ b/install-script.sh @@ -2,7 +2,12 @@ # Source https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71 -if ! [ -x "$(command -v docker compose)" ]; then +if ! [ -x "$(command -v docker)" ]; then + echo 'Error: docker is not installed.' >&2 + exit 1 +fi + +if ! [ -x "$(command -v compose)" ]; then echo 'Error: docker compose is not installed.' >&2 exit 1 fi