AlexsLemonade / AlexsLemonade/refinebio

Move logs and static files from /tmp to /var

Open
#3,452 0 comments 0 reactions 1 assignee Claimed by @davidsmejia View on GitHub
Dominant language
Python
Stars
135
Forks
21
PR merge metrics
No merged PRs in 30d

Description

### 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`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.