forked from GeorgDaniel/bloqCat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (22 loc) · 832 Bytes
/
Dockerfile
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
29
30
# Use the official Python image as the base image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the pyproject.toml and poetry.lock files to the container
COPY pyproject.toml poetry.lock /app/
ENV PATH="/root/.local/bin:${PATH}"
# Install poetry and project dependencies
RUN python3 -m pip install --user pipx && \
python3 -m pipx ensurepath && \
pipx install poetry && \
poetry config virtualenvs.create false && \
poetry install --no-interaction --no-ansi
# Copy the rest of the application code to the container
COPY . /app/
# Expose the port that the Flask app will run on
EXPOSE 5000
# Set environment variables for Flask
ENV FLASK_APP=bloqcat
ENV FLASK_RUN_HOST=0.0.0.0
# Specify the command to run when the container starts
CMD ["poetry", "run", "flask", "run"]