Initial commit: SYNC_API project

This commit is contained in:
2025-11-06 09:50:10 -07:00
commit 733ef04eeb
42 changed files with 2380 additions and 0 deletions

43
sync_api/Dockerfile Normal file
View File

@@ -0,0 +1,43 @@
# Usar imagen base de Python
FROM python:3.12-slim
# Establecer directorio de trabajo
WORKDIR /app
# Instalar dependencias del sistema necesarias para SQL Server
RUN apt-get update && apt-get install -y \
curl \
gnupg \
unixodbc \
unixodbc-dev \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y msodbcsql17 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copiar requirements
COPY requirements.txt .
# Instalar dependencias Python
RUN pip install --no-cache-dir -r requirements.txt
# Copiar código fuente
COPY . .
# Crear directorio SSL y copiar certificados
RUN mkdir -p ssl
COPY ssl/ ssl/
# Exponer puerto
EXPOSE 9443
# Variables de entorno por defecto
ENV API_HOST=0.0.0.0
ENV API_PORT=9443
ENV DEBUG_MODE=False
ENV LOG_LEVEL=INFO
# Comando para ejecutar la aplicación
CMD ["python", "main.py"]