Skip to content

Commit

Permalink
fix : log 파일로 수집하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-1116 committed Jul 30, 2024
1 parent 70c342b commit ef86da7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username ${{ secrets.AWS_DOCKER_USER }} --password-stdin ${{ secrets.AWS_USER_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
docker image prune -f
docker pull ${{ steps.meta.outputs.tags }}
docker run -d -p 5555:5555 -p 9001:9001 --name animated_drawings -e ENVIRONMENT='dev' ${{ steps.meta.outputs.tags }}
docker run -d -p 5555:5555 -p 9001:9001 --name animated_drawings -v log_volume:/app/application/log -e ENVIRONMENT='dev' ${{ steps.meta.outputs.tags }}
- name: Remove Github Actions IP from security group
if: always()
Expand Down
2 changes: 2 additions & 0 deletions backend/AnimatedDrawings/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ RUN pip install -e .

WORKDIR /app/application

RUN mkdir log

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
12 changes: 6 additions & 6 deletions backend/AnimatedDrawings/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ directory = /app/application
command = /opt/conda/envs/animated_drawings/bin/celery -A celery_app flower --conf="/app/application/config/flowerconfig.py"
priority = 100
loglevel=info
stdout_logfile = /var/log/flower.log
stderr_logfile = /var/log/flower.err
stdout_logfile = /app/application/log/flower.log
stderr_logfile = /app/application/log/flower.err
stdout_logfile_maxbytes = 50MB
stdout_logfile_backups = 30
stderr_logfile_maxbytes = 50MB
Expand All @@ -24,8 +24,8 @@ directory = /app/application
command = /opt/conda/envs/animated_drawings/bin/python3 -u animation_queue.py
loglevel=info
priority = 100
stdout_logfile = /var/log/application.log
stderr_logfile = /var/log/application.err
stdout_logfile = /app/application/log/application.log
stderr_logfile = /app/application/log/application.err
stdout_logfile_maxbytes = 50MB
stdout_logfile_backups = 30
stderr_logfile_maxbytes = 50MB
Expand All @@ -37,8 +37,8 @@ directory = /app/application
command = /opt/conda/envs/animated_drawings/bin/celery -A celery_app worker
priority = 200
loglevel=info
stdout_logfile = /var/log/celeryd.log
stderr_logfile = /var/log/celeryd.err
stdout_logfile = /app/application/log/celeryd.log
stderr_logfile = /app/application/log/celeryd.err
stdout_logfile_maxbytes = 50MB
stdout_logfile_backups = 30
stderr_logfile_maxbytes = 50MB
Expand Down

0 comments on commit ef86da7

Please sign in to comment.