This commit is contained in:
2025-06-04 08:25:23 +02:00
parent 12ecaef5d1
commit 366dba2f17
2 changed files with 22 additions and 1 deletions

View File

@@ -21,6 +21,16 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Debug: List files and check tasks.py
RUN ls -la /app && \
echo "Checking tasks.py:" && \
if [ -f /app/tasks.py ]; then \
echo "tasks.py exists" && \
cat /app/tasks.py; \
else \
echo "tasks.py does not exist"; \
fi
# Create necessary directories and set permissions
RUN mkdir -p /app/uploads /app/static/uploads && \
chown -R celery:celery /app
@@ -49,6 +59,15 @@ echo "Starting application..."\n\
exec "$@"' > /app/entrypoint.sh && \
chmod +x /app/entrypoint.sh
# Set environment variables
ENV PYTHONPATH=/app
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
# Make sure tasks.py is executable and has correct permissions
RUN chmod 644 /app/tasks.py && \
chown celery:celery /app/tasks.py
# Switch to non-root user
USER celery