Files
LifeFaq/Dockerfile
Henrik Jess 23a22fb4d6
Some checks failed
Build, Push, and Blue/Green Deploy to Nomad / docker-nomad (push) Failing after 6s
Blue Green
2024-12-20 10:37:56 +01:00

20 lines
604 B
Docker

# Base image with Python 3.11
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file to the working directory
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose the default port (optional, primarily for documentation purposes)
EXPOSE 9210
# Command to run the FastAPI application dynamically using the PORT environment variable
CMD ["sh", "-c", "uvicorn app.main:app --proxy-headers --host 0.0.0.0 --port ${PORT:-9210} --workers 1"]