mirror of
https://github.com/senju1337/senju.git
synced 2025-12-23 23:39:27 +00:00
Refs: OPS-10 The Dockerfile is renamed to the canonical name and not contains multiple stages to eventually support dev and pod builds
23 lines
443 B
Docker
23 lines
443 B
Docker
FROM python:3.12-alpine AS base
|
|
|
|
# VENV not needed in docker container
|
|
ENV POETRY_VIRTUALENVS_CREATE=false
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
# Install dependencies
|
|
RUN pip install poetry
|
|
RUN poetry install
|
|
|
|
|
|
FROM base as dev
|
|
|
|
# Expose development port
|
|
EXPOSE 5000
|
|
|
|
# Include host flag to make flask listen on all interfaces
|
|
# Otherwise it is not accessible from the outside.
|
|
CMD [ "flask", "--app", "senju/main", "run", "--debug", "--host=0.0.0.0"]
|
|
|