Supported MySQL Changes Listening

This commit is contained in:
2025-03-09 00:12:28 +03:00
parent 41d98aafe9
commit 77b23eaad2
9 changed files with 304 additions and 49 deletions

View File

@@ -1,23 +1,35 @@
FROM python:3.12-slim
FROM python:3.12.9-alpine3.21
# FROM python:3.12-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set the working directory inside the container
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
# Install system dependencies required for MySQL and other libraries
# RUN apt-get update && apt-get install -y \
# default-libmysqlclient-dev \
# build-essential \
# && rm -rf /var/lib/apt/lists/*
# Copy the requirements file into the container
COPY files/requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Clone the Git repository
RUN apt-get update && apt-get install -y git \
&& git clone https://gitea.abdulhade.com/abdulhade/db-middleware.git . \
&& apt-get remove -y git \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# RUN git clone https://github.com/streamlit/streamlit-example.git .
COPY requirements.txt .
# Expose port 8080 for the FastAPI application
EXPOSE 8080
RUN pip3 install -r requirements.txt
# COPY . .
EXPOSE 8333
# HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
# ENTRYPOINT ["streamlit", "run", "main.py", "--server.port=8501", "--server.address=0.0.0.0"]
# Command to run the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]