better admin creation

This commit is contained in:
2025-06-09 13:45:00 +02:00
parent c31f1bb59d
commit e43718894b
4 changed files with 45 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y \
postgresql-client \
curl \
netcat-traditional \
dos2unix \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user
@@ -22,15 +23,13 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create necessary directories and set permissions
RUN mkdir -p /app/uploads/rooms /app/uploads/profile_pics /app/static/uploads && \
# Convert line endings and set permissions
RUN dos2unix /app/entrypoint.sh && \
chmod +x /app/entrypoint.sh && \
mkdir -p /app/uploads/rooms /app/uploads/profile_pics /app/static/uploads && \
chown -R celery:celery /app && \
chmod -R 755 /app/uploads
# Make entrypoint script executable
RUN chmod +x /app/entrypoint.sh && \
chown celery:celery /app/entrypoint.sh
# Switch to non-root user
USER celery