-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Kost0ne/feature/demo_docker
Демонстрационный контейнер
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM python:3.11-slim | ||
|
||
ENV PIP_DISABLE_PIP_VERSION_CHECK=on | ||
ENV PIP_NO_CACHE_DIR=off | ||
|
||
WORKDIR /code | ||
|
||
RUN apt-get update -o Acquire::Check-Valid-Until=false \ | ||
&& apt-get install -y --no-install-recommends \ | ||
gcc \ | ||
libsasl2-dev \ | ||
libldap2-dev \ | ||
libssl-dev \ | ||
libpq-dev \ | ||
make \ | ||
g++ \ | ||
libgnutls28-dev \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ARG POETRYCACHEDIR=/tmp/.cache/pypoetry | ||
|
||
COPY . /code/ | ||
COPY poetry.lock pyproject.toml /code/ | ||
|
||
RUN pip install --no-compile --upgrade pip \ | ||
&& pip install --no-compile poetry | ||
RUN poetry config virtualenvs.create false \ | ||
&& poetry config cache-dir ${POETRYCACHEDIR} \ | ||
&& poetry install --no-interaction --no-ansi | ||
|
||
ENV PYTHONPATH "/code" | ||
|
||
CMD poetry run overhave db create-all && poetry run overhave-demo admin --host 0.0.0.0 |