Enhance Docker setup with logging and monitoring features
- Added logging configuration to WSGI for persistent log collection. - Updated Docker Compose files for local and development environments, including Redis, PostgreSQL, and Grafana services. - Introduced Promtail configuration for log scraping and integration with Loki. - Created application log directory in Dockerfile for log persistence.
This commit is contained in:
@@ -57,6 +57,12 @@ ENV PATH="/opt/venv/bin:$PATH"
|
||||
# `--chown` flag during COPY and avoid an expensive recursive `chown -R`.
|
||||
RUN useradd -m appuser
|
||||
|
||||
# Create directory for application logs and ensure ownership is correct.
|
||||
# Do this as root before switching to `appuser` so the directory exists
|
||||
# and can be mounted by the dev compose override.
|
||||
RUN mkdir -p /var/log/rad \
|
||||
&& chown -R appuser:appuser /var/log/rad
|
||||
|
||||
# Copy project files into image and set ownership during copy (faster than
|
||||
# a separate `chown -R` step). This keeps layer reuse efficient.
|
||||
COPY --chown=appuser:appuser . /usr/src/app
|
||||
|
||||
Reference in New Issue
Block a user