From 0d50db20aedcef504f646cf42ca2a28c58ae86bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Engl=C3=B6f=20Ytterstr=C3=B6m?= Date: Tue, 3 Sep 2024 00:52:54 +0200 Subject: [PATCH] Introduce container build files --- Containerfile | 16 ++++++++++++++++ Containerfile.aio | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 Containerfile create mode 100644 Containerfile.aio diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..dd5b416 --- /dev/null +++ b/Containerfile @@ -0,0 +1,16 @@ +FROM python:3-alpine3.20 AS base + +WORKDIR /app + +FROM base AS reqs +COPY requirements.txt requirements.txt +RUN pip install -r requirements.txt + +FROM reqs AS app +COPY templates templates +COPY wsgi.py wsgi.py + +VOLUME images + +ENTRYPOINT waitress-serve --host 127.0.0.1 --port 5099 wsgi:app + diff --git a/Containerfile.aio b/Containerfile.aio new file mode 100644 index 0000000..a2f3f36 --- /dev/null +++ b/Containerfile.aio @@ -0,0 +1,18 @@ +FROM python:3-alpine3.20 AS base + +WORKDIR /app + +FROM base AS reqs +COPY requirements.txt requirements.txt +RUN pip install -r requirements.txt + +FROM reqs AS app +COPY templates templates +COPY wsgi.py wsgi.py + +FROM app AS imgs +ARG images +copy ${images} images + +ENTRYPOINT waitress-serve --host 127.0.0.1 --port 5099 wsgi:app +