diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b4d6362 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,16 @@ +# Exclude everything +* + +# Include specific files and directories +!start.sh +!requirements.txt +!app.py +!celery_worker.py +!models.py +!extensions.py +!utils/ +!routes/ +!templates/ +!static/ +!migrations/ +!uploads/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d884047..d54d7d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,17 +15,16 @@ 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 the entire application +COPY . /app/ -# Copy requirements and install dependencies -COPY requirements.txt . +# Set up start.sh +RUN chmod +x /app/start.sh && \ + chown celery:celery /app/start.sh + +# Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt -# Copy the rest of the application -COPY . . - # Create necessary directories and set permissions RUN mkdir -p /data/rooms && \ chown -R celery:celery /data && \ @@ -36,4 +35,4 @@ RUN mkdir -p /data/rooms && \ USER celery # Set entrypoint -ENTRYPOINT ["./start.sh"] \ No newline at end of file +ENTRYPOINT ["/app/start.sh"] \ No newline at end of file