diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d02d369 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,16 @@ +*.gz +*.session +.bumpversion.cfg +.coverage* +.editorconfig +.envr* +.git* +.dockerignore +.github +.pytest_cache +.venv +Dockerfile +Makefile +Makefile.venv +README.md +main.tf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e996f94 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM python:3.11-slim-bookworm +LABEL org.opencontainers.image.authors="Slavik Svyrydiuk " +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL "C.UTF-8" +ENV LANG "C.UTF-8" + +WORKDIR /app + +COPY requirements.txt /tmp/ +RUN pip3 install \ + --quiet \ + --no-cache-dir \ + --disable-pip-version-check \ + --requirement /tmp/requirements.txt && \ + rm -fr \ + /root/.cache \ + /usr/share/zoneinfo && \ + apt-get remove --purge --yes --allow-remove-essential \ + e2fsprogs \ + perl-base \ + bsdutils +COPY . /app +EXPOSE 8000 +CMD [ \ + "uvicorn", \ + "telega.app:app", \ + "--host", "0.0.0.0", \ + "--port", "8000", \ + "--log-level", "debug" \ +]