chore: update Dockerfile and supervisord configuration for improved logging

- Modified the Dockerfile to streamline the creation of the supervisor configuration directory.
- Updated `infra/supervisord.conf` to redirect logs to stdout and stderr, enhancing log management and visibility.
- Removed specific log file paths and sizes to simplify logging setup.
This commit is contained in:
Daniel Luiz Alves
2025-06-17 23:23:36 -03:00
parent b28f1f97c4
commit 281eff0f14
2 changed files with 12 additions and 6 deletions

View File

@@ -115,7 +115,7 @@ COPY --from=web-builder --chown=palmr:nodejs /app/web/.next/static ./.next/stati
WORKDIR /app
# Create supervisor configuration
RUN mkdir -p /etc/supervisor/conf.d /var/log/supervisor
RUN mkdir -p /etc/supervisor/conf.d
# Copy server start script
COPY infra/server-start.sh /app/server-start.sh

View File

@@ -1,8 +1,10 @@
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
logfile=/dev/stdout
logfile_maxbytes=0
pidfile=/var/run/supervisord.pid
loglevel=info
[program:server]
command=/bin/sh -c "export DATABASE_URL='file:/app/server/prisma/palmr.db' && export UPLOAD_PATH='/app/server/uploads' && export TEMP_CHUNKS_PATH='/app/server/temp-chunks' && /app/server-start.sh"
@@ -10,8 +12,10 @@ directory=/app/palmr-app
user=root
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/server.err.log
stdout_logfile=/var/log/supervisor/server.out.log
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
environment=PORT=3333,HOME="/home/palmr"
priority=100
@@ -21,8 +25,10 @@ directory=/app/web
user=palmr
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/web.err.log
stdout_logfile=/var/log/supervisor/web.out.log
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
environment=PORT=5487,HOSTNAME="0.0.0.0",HOME="/home/palmr",API_BASE_URL="http://127.0.0.1:3333"
priority=200
startsecs=10