ksyasuda af0d958b89
All checks were successful
Build Docker Image / build (push) Successful in 12m54s
update code structure and get session on each query
2025-02-09 20:20:10 -08:00

31 lines
887 B
Docker

# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set environment variables for the MPV socket and server host/port
ENV LISTEN_ADDRESS="0.0.0.0" \
LISTEN_PORT=8080
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
# If there are no external dependencies, you can skip this step
# RUN pip install --no-cache-dir -r requirements.txt
# Make port 8080 available to the world outside this container
EXPOSE "${PORT_NUMBER}"
RUN pip3 install --no-cache-dir -r requirements.txt
# Run server.py when the container launches
CMD gunicorn --bind "${LISTEN_ADDRESS}":"${LISTEN_PORT}" run:app