fix permission issue on docker
This commit is contained in:
@@ -22,8 +22,9 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Create necessary directories and set permissions
|
# Create necessary directories and set permissions
|
||||||
RUN mkdir -p /app/uploads /app/static/uploads && \
|
RUN mkdir -p /app/uploads/rooms /app/static/uploads && \
|
||||||
chown -R celery:celery /app
|
chown -R celery:celery /app && \
|
||||||
|
chmod -R 755 /app/uploads
|
||||||
|
|
||||||
# Create and set up startup script
|
# Create and set up startup script
|
||||||
RUN echo '#!/bin/bash\n\
|
RUN echo '#!/bin/bash\n\
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ from utils import log_event, create_notification, get_unread_count
|
|||||||
room_files_bp = Blueprint('room_files', __name__, url_prefix='/api/rooms')
|
room_files_bp = Blueprint('room_files', __name__, url_prefix='/api/rooms')
|
||||||
|
|
||||||
# Root directory for storing room files
|
# Root directory for storing room files
|
||||||
DATA_ROOT = '/data/rooms' # This should be a Docker volume
|
DATA_ROOT = '/app/uploads/rooms' # Updated to match Docker volume mount point
|
||||||
|
|
||||||
# Set of allowed file extensions for upload
|
# Set of allowed file extensions for upload
|
||||||
ALLOWED_EXTENSIONS = {
|
ALLOWED_EXTENSIONS = {
|
||||||
|
|||||||
Reference in New Issue
Block a user