diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ae9df0f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,43 @@ +# Git +.git +.gitignore + +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# Virtual Environment +venv/ +ENV/ + +# IDE +.idea/ +.vscode/ +*.swp +*.swo + +# Local development +*.log +.env +.env.local +.env.*.local + +# Keep start.sh \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d972334..d0037ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +ENTRYPOINT ["./start.sh"] \ No newline at end of file