Further updates to fix permissions issues
This commit is contained in:
@@ -11,6 +11,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY bot.py .
|
||||
COPY config.py .
|
||||
COPY entrypoint.sh .
|
||||
|
||||
# Create DB directory with proper permissions
|
||||
RUN mkdir -p /app/DB && chown -R botuser:botgroup /app
|
||||
@@ -20,4 +21,5 @@ ENV PYTHONUNBUFFERED=1
|
||||
# Switch to non-root user
|
||||
USER botuser
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
CMD ["python", "bot.py"]
|
||||
|
||||
@@ -12,3 +12,4 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./DB:/app/DB
|
||||
entrypoint: ["/app/entrypoint.sh", "python", "bot.py"]
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Fix permissions for DB folder
|
||||
chown -R botuser:botgroup /app/DB
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user