try to get docker working
This commit is contained in:
16
.dockerignore
Normal file
16
.dockerignore
Normal file
@@ -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/
|
||||||
17
Dockerfile
17
Dockerfile
@@ -15,17 +15,16 @@ RUN useradd -m -u 1000 celery
|
|||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy start.sh first and set permissions
|
# Copy the entire application
|
||||||
COPY start.sh .
|
COPY . /app/
|
||||||
RUN chmod +x start.sh
|
|
||||||
|
|
||||||
# Copy requirements and install dependencies
|
# Set up start.sh
|
||||||
COPY requirements.txt .
|
RUN chmod +x /app/start.sh && \
|
||||||
|
chown celery:celery /app/start.sh
|
||||||
|
|
||||||
|
# Install Python dependencies
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy the rest of the application
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Create necessary directories and set permissions
|
# Create necessary directories and set permissions
|
||||||
RUN mkdir -p /data/rooms && \
|
RUN mkdir -p /data/rooms && \
|
||||||
chown -R celery:celery /data && \
|
chown -R celery:celery /data && \
|
||||||
@@ -36,4 +35,4 @@ RUN mkdir -p /data/rooms && \
|
|||||||
USER celery
|
USER celery
|
||||||
|
|
||||||
# Set entrypoint
|
# Set entrypoint
|
||||||
ENTRYPOINT ["./start.sh"]
|
ENTRYPOINT ["/app/start.sh"]
|
||||||
Reference in New Issue
Block a user