mirror of
https://github.com/vegu-ai/talemate.git
synced 2025-12-16 19:57:47 +01:00
25 lines
652 B
Docker
25 lines
652 B
Docker
|
|
# Use an official Python runtime as a parent image
|
||
|
|
FROM python:3.11-slim
|
||
|
|
|
||
|
|
# Set the working directory in the container
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
# Copy the current directory contents into the container at /app
|
||
|
|
COPY ./src /app/src
|
||
|
|
|
||
|
|
# Copy poetry files
|
||
|
|
COPY pyproject.toml /app/
|
||
|
|
# If there's a poetry lock file, include the following line
|
||
|
|
COPY poetry.lock /app/
|
||
|
|
|
||
|
|
# Install poetry
|
||
|
|
RUN pip install poetry
|
||
|
|
|
||
|
|
# Install dependencies
|
||
|
|
RUN poetry install --no-dev
|
||
|
|
|
||
|
|
# Make port 5050 available to the world outside this container
|
||
|
|
EXPOSE 5050
|
||
|
|
|
||
|
|
# Run backend server
|
||
|
|
CMD ["poetry", "run", "python", "src/talemate/server/run.py", "runserver", "--host", "0.0.0.0", "--port", "5050"]
|