From db7d021b58fde0341a1cf16230005727b2dc1c69 Mon Sep 17 00:00:00 2001 From: pstruebi Date: Mon, 24 Jun 2024 21:13:12 +0200 Subject: [PATCH] refractoring --- Dockerfile | 4 ++-- build_an_run_production.sh | 1 + app.py => propedal-planner/app.py | 0 auth.py => propedal-planner/auth.py | 0 .../calendar_interface.py | 0 config.py => propedal-planner/config.py | 0 db.py => propedal-planner/db.py | 0 requirements.txt => propedal-planner/requirements.txt | 0 .../run_production_server.sh | 0 .../templates}/auth/confirm_mail.html | 0 .../templates}/auth/confirmation.html | 0 {templates => propedal-planner/templates}/auth/login.html | 0 {templates => propedal-planner/templates}/auth/register.html | 0 {templates => propedal-planner/templates}/base.html | 0 {templates => propedal-planner/templates}/index.html | 0 {templates => propedal-planner/templates}/show_event.html | 0 run_dev_server.sh | 2 ++ 17 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 build_an_run_production.sh rename app.py => propedal-planner/app.py (100%) rename auth.py => propedal-planner/auth.py (100%) rename calendar_interface.py => propedal-planner/calendar_interface.py (100%) rename config.py => propedal-planner/config.py (100%) rename db.py => propedal-planner/db.py (100%) rename requirements.txt => propedal-planner/requirements.txt (100%) rename run_production_server.sh => propedal-planner/run_production_server.sh (100%) rename {templates => propedal-planner/templates}/auth/confirm_mail.html (100%) rename {templates => propedal-planner/templates}/auth/confirmation.html (100%) rename {templates => propedal-planner/templates}/auth/login.html (100%) rename {templates => propedal-planner/templates}/auth/register.html (100%) rename {templates => propedal-planner/templates}/base.html (100%) rename {templates => propedal-planner/templates}/index.html (100%) rename {templates => propedal-planner/templates}/show_event.html (100%) diff --git a/Dockerfile b/Dockerfile index efd3c67..4e19e1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,10 @@ FROM python:3.10 WORKDIR /app # Copy the current directory contents into the container at /app -COPY . /app +COPY ./propedal-planner /app # Install any needed packages specified in requirements.txt -RUN pip install -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt # Make port available to the world outside this container EXPOSE 8001 diff --git a/build_an_run_production.sh b/build_an_run_production.sh new file mode 100644 index 0000000..b318b27 --- /dev/null +++ b/build_an_run_production.sh @@ -0,0 +1 @@ +docker compose up -d --build \ No newline at end of file diff --git a/app.py b/propedal-planner/app.py similarity index 100% rename from app.py rename to propedal-planner/app.py diff --git a/auth.py b/propedal-planner/auth.py similarity index 100% rename from auth.py rename to propedal-planner/auth.py diff --git a/calendar_interface.py b/propedal-planner/calendar_interface.py similarity index 100% rename from calendar_interface.py rename to propedal-planner/calendar_interface.py diff --git a/config.py b/propedal-planner/config.py similarity index 100% rename from config.py rename to propedal-planner/config.py diff --git a/db.py b/propedal-planner/db.py similarity index 100% rename from db.py rename to propedal-planner/db.py diff --git a/requirements.txt b/propedal-planner/requirements.txt similarity index 100% rename from requirements.txt rename to propedal-planner/requirements.txt diff --git a/run_production_server.sh b/propedal-planner/run_production_server.sh similarity index 100% rename from run_production_server.sh rename to propedal-planner/run_production_server.sh diff --git a/templates/auth/confirm_mail.html b/propedal-planner/templates/auth/confirm_mail.html similarity index 100% rename from templates/auth/confirm_mail.html rename to propedal-planner/templates/auth/confirm_mail.html diff --git a/templates/auth/confirmation.html b/propedal-planner/templates/auth/confirmation.html similarity index 100% rename from templates/auth/confirmation.html rename to propedal-planner/templates/auth/confirmation.html diff --git a/templates/auth/login.html b/propedal-planner/templates/auth/login.html similarity index 100% rename from templates/auth/login.html rename to propedal-planner/templates/auth/login.html diff --git a/templates/auth/register.html b/propedal-planner/templates/auth/register.html similarity index 100% rename from templates/auth/register.html rename to propedal-planner/templates/auth/register.html diff --git a/templates/base.html b/propedal-planner/templates/base.html similarity index 100% rename from templates/base.html rename to propedal-planner/templates/base.html diff --git a/templates/index.html b/propedal-planner/templates/index.html similarity index 100% rename from templates/index.html rename to propedal-planner/templates/index.html diff --git a/templates/show_event.html b/propedal-planner/templates/show_event.html similarity index 100% rename from templates/show_event.html rename to propedal-planner/templates/show_event.html diff --git a/run_dev_server.sh b/run_dev_server.sh index 6f514ee..3f76a3e 100644 --- a/run_dev_server.sh +++ b/run_dev_server.sh @@ -1,3 +1,5 @@ export FLASK_ENV=development export CONFIG=config.DevelopmentConfig +export FLASK_APP=propedal-planner/app.py +#cd ./app flask run --host=0.0.0.0 \ No newline at end of file