Refactor backend and add registry build workflow
Build and publish Docker image / build-and-publish (push) Successful in 2m45s
Build and publish Docker image / build-and-publish (push) Successful in 2m45s
This commit is contained in:
commit
c177d7981d
43 files changed
+18124
No files matched your search
+35
@@ -0,0 +1,35 @@
|
||||
# Use official Python image
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies (needed for some python packages like psycopg2)
|
||||
# libpq-dev is often needed for psycopg2
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for caching
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the rest of the application
|
||||
COPY . .
|
||||
|
||||
# Expose ports
|
||||
# 8080 for HTTP API
|
||||
# 8081 for WebSocket
|
||||
EXPOSE 8080
|
||||
EXPOSE 8081
|
||||
|
||||
# Define environment variables
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PORT=8080
|
||||
ENV WS_PORT=8081
|
||||
|
||||
# Command to run the application
|
||||
CMD ["python", "app.py"]
|
||||
Reference in new issue
Block a user