more docker changes

This commit is contained in:
2025-06-04 08:09:22 +02:00
parent 4594e6185e
commit baae8ed694
2 changed files with 49 additions and 3 deletions

View File

@@ -14,6 +14,10 @@ RUN useradd -m -u 1000 celery
# Set working directory
WORKDIR /app
# Copy start.sh first and set permissions
COPY start.sh .
RUN chmod +x start.sh
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
@@ -23,11 +27,10 @@ COPY . .
# Create necessary directories and set permissions
RUN mkdir -p /app/uploads /app/static/uploads && \
chown -R celery:celery /app && \
chmod +x /app/start.sh
chown -R celery:celery /app
# Switch to non-root user
USER celery
# Set entrypoint
ENTRYPOINT ["/app/start.sh"]
ENTRYPOINT ["./start.sh"]