Fix dockerfile

This commit is contained in:
Urtzi Alfaro
2025-07-17 15:55:23 +02:00
parent afedad69e9
commit 013d32d00f
106 changed files with 109 additions and 4607 deletions

View File

@@ -1,3 +1,9 @@
# Add this stage at the top of each service Dockerfile
FROM python:3.11-slim as shared
WORKDIR /shared
COPY shared/ /shared/
# Then your main service stage
FROM python:3.11-slim
WORKDIR /app
@@ -9,16 +15,16 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
COPY services/auth/requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy shared libraries
COPY shared/ /app/shared/
# Copy shared libraries from the shared stage
COPY --from=shared /shared /app/shared
# Copy application code
COPY . .
COPY services/auth/ .
# Add shared libraries to Python path
ENV PYTHONPATH="/app:/app/shared:$PYTHONPATH"