aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..d1fa475
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,17 @@
+FROM python:slim
+
+ENV PYTHONFAULTHANDLER=1 \
+ PYTHONUNBUFFERED=1 \
+ PYTHONHASHSEED=random \
+ PIP_NO_CACHE_DIR=off \
+ PIP_DISABLE_PIP_VERSION_CHECK=on \
+ PIP_DEFAULT_TIMEOUT=100
+
+WORKDIR /metricity
+COPY poetry.lock pyproject.toml /metricity/
+
+RUN poetry config virtualenvs.create false && poetry install
+
+COPY . /metricity
+
+CMD ["sh", "-c", "alembic upgrade head && poetry run start"]