Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move logs and static files from /tmp to /var #3452

Open
davidsmejia opened this issue Nov 3, 2023 · 0 comments
Open

Move logs and static files from /tmp to /var #3452

davidsmejia opened this issue Nov 3, 2023 · 0 comments
Assignees

Comments

@davidsmejia
Copy link
Contributor

Context

Currently, when we launch the API we write Nginx access and error logs to /tmp as well as serving generated static files. This seem to be an issue after deploy. Trying to tail logs from /tmp/access.log does nothing which indicates that the container cannot write to that file. Similarly, static files are unable to be served from /tmp.

Problem or idea

We should move nginx logs and static content to their appropriate location in /var.
Nginx logs should be located at /var/log/nginx/access.log and /var/log/nginx/error.log
Static content should be served in nginx from /var/www/volumes_static

Solution or next step

  • update nginx.conf to write logs to `/var/log/nginx``
  • update nginx.conf to serve static files from /var/www/volumes_static
  • update user data script template to rotate logs from /var/log/nginx
  • update user data script to map static directory to /var/www/volumes_static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant