Permissions in docker containers

No I have the exact same issue that’s why I didn’t create separate question.

Docker configuration:

# Stage 2: Production stage
FROM python:3.13-slim
 
RUN useradd -m -r appuser && \
   mkdir /app && \
   chown -R appuser /app
 
# Copy the Python dependencies from the builder stage
COPY --from=builder /usr/local/lib/python3.13/site-packages/ /usr/local/lib/python3.13/site-packages/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
 
# Set the working directory
WORKDIR /app
 
# Copy application code
COPY --chown=appuser:appuser . .

# Set environment variables to optimize Python
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1 
 
# Switch to non-root user
USER appuser
 
# Expose the application port
EXPOSE 80

# Make the entrypoint script executable
RUN chmod +x  /app/entrypoint.prod.sh

# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
CMD ["/app/entrypoint.prod.sh"]

entrypoint.prod.sh file:

#!/usr/bin/env bash

echo "Running as user: $(whoami)"

python manage.py migrate --database migration_db --noinput

python manage.py collectstatic --noinput

python -m gunicorn --bind 0.0.0.0:80 --workers 3 grow_with_odoo.wsgi:application

and I set volume in docker compose like this:

volumes:
   - grow_with_odoo_static:/app/grow_with_odoo/staticfiles

EDIT:

here are the files permissions in the app container

-rw-rw-r-- 1 appuser appuser    0 May  2 23:31 __init__.py
-rw-rw-r-- 1 appuser appuser  405 May  2 23:31 asgi.py
drwxrwxr-x 2 appuser appuser 4096 May  2 23:31 settings
drwxr-xr-x 2 root    root    4096 May  2 23:34 staticfiles
-rw-rw-r-- 1 appuser appuser 1136 May  2 23:31 urls.py
-rw-rw-r-- 1 appuser appuser  405 May  2 23:31 wsgi.py