-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 870 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM python:3.12
LABEL authors="ask4git"
WORKDIR /app
RUN apt-get update && apt-get install -y python3-venv python3-pip curl
# Install pipx so we can install poetry system wide
RUN python3 -m pip install --no-cache-dir --user pipx && \
python3 -m pipx ensurepath
ENV PATH=/root/.local/bin:$PATH
# Install poetry to install our dependencies
RUN pipx install poetry==1.8.3
ENV PATH=/root/.local/bin:$PATH
ENV DJANGO_SETTINGS_MODULE=beanlibapi.config.settings.docker
COPY pyproject.toml poetry.lock* /app/
RUN poetry config virtualenvs.create false && \
poetry config installer.max-workers 10 && \
poetry install --no-interaction --no-dev --no-ansi --no-root -vvv && \
poetry cache clear pypi --all -n
COPY . /app
EXPOSE 8000
ENTRYPOINT ["./entrypoint.sh"]
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "beanlibapi.config.wsgi:application"]