diff --git a/Containerfile b/Containerfile index 250a2cf65d2fb1ce3f556203261985cecea7215a..60a554aec68133a0360be84c090fb26b321d77d4 100644 --- a/Containerfile +++ b/Containerfile @@ -23,4 +23,5 @@ VOLUME /usr/local/var/schilder2000-instance/ COPY examples /usr/local/var/schilder2000-instance WORKDIR /usr/local/var/schilder2000-instance/ ENV FLASK_APP=schilder2000 -CMD ["gunicorn", "schilder2000:create_app()"] +CMD ["gunicorn", "--config", "/usr/local/var/schilder2000-instance/config/gunicorn.conf.py", "schilder2000:create_app()"] +EXPOSE 8080 diff --git a/examples/config.py b/examples/config/config.py similarity index 100% rename from examples/config.py rename to examples/config/config.py diff --git a/examples/gunicorn.conf.py b/examples/config/gunicorn.conf.py similarity index 100% rename from examples/gunicorn.conf.py rename to examples/config/gunicorn.conf.py diff --git a/examples/static/img/arrow.svg b/examples/data/static/img/arrow.svg similarity index 100% rename from examples/static/img/arrow.svg rename to examples/data/static/img/arrow.svg diff --git a/examples/static/img/sample.png b/examples/data/static/img/sample.png similarity index 100% rename from examples/static/img/sample.png rename to examples/data/static/img/sample.png diff --git a/examples/static/schild.css b/examples/data/static/schild.css similarity index 100% rename from examples/static/schild.css rename to examples/data/static/schild.css diff --git a/examples/templates/_layout.html.j2 b/examples/data/templates/_layout.html.j2 similarity index 100% rename from examples/templates/_layout.html.j2 rename to examples/data/templates/_layout.html.j2 diff --git a/examples/templates/image-left.html.j2 b/examples/data/templates/image-left.html.j2 similarity index 100% rename from examples/templates/image-left.html.j2 rename to examples/data/templates/image-left.html.j2 diff --git a/examples/templates/text-only.html.j2 b/examples/data/templates/text-only.html.j2 similarity index 100% rename from examples/templates/text-only.html.j2 rename to examples/data/templates/text-only.html.j2 diff --git a/schilder2000/__init__.py b/schilder2000/__init__.py index 41757ddc8b48e1da6c1735006125dd64a4be41d7..ebbb813e9eead902e53e7d6f120d8b35a3abc019 100644 --- a/schilder2000/__init__.py +++ b/schilder2000/__init__.py @@ -16,7 +16,7 @@ multipass = Multipass() def create_app(): app = Flask(__name__, instance_relative_config=True) - app.config.from_pyfile("config.py") + app.config.from_pyfile("config/config.py") app.cli.add_command(cli.alembic) @@ -57,8 +57,8 @@ def create_app(): from . import instance - instance.bp.static_folder = instance_path / "static" - instance.bp.template_folder = instance_path / "templates" + instance.bp.static_folder = instance_path / "data" / "static" + instance.bp.template_folder = instance_path / "data" / "templates" if app.config["REQUIRE_LOGIN"]: instance.bp.before_request(require_login) app.register_blueprint(instance.bp)