Further updates to fix permissions issues

This commit is contained in:
2026-03-11 18:09:41 +00:00
parent c605e00e95
commit e47a28efae
3 changed files with 10 additions and 0 deletions
+2
View File
@@ -11,6 +11,7 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY bot.py . COPY bot.py .
COPY config.py . COPY config.py .
COPY entrypoint.sh .
# Create DB directory with proper permissions # Create DB directory with proper permissions
RUN mkdir -p /app/DB && chown -R botuser:botgroup /app RUN mkdir -p /app/DB && chown -R botuser:botgroup /app
@@ -20,4 +21,5 @@ ENV PYTHONUNBUFFERED=1
# Switch to non-root user # Switch to non-root user
USER botuser USER botuser
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["python", "bot.py"] CMD ["python", "bot.py"]
+1
View File
@@ -12,3 +12,4 @@ services:
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./DB:/app/DB - ./DB:/app/DB
entrypoint: ["/app/entrypoint.sh", "python", "bot.py"]
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
set -e
# Fix permissions for DB folder
chown -R botuser:botgroup /app/DB
exec "$@"