misc: factor some /var/log references (#52526)

This commit is contained in:
Emmanuel Cazenave 2021-03-30 17:05:24 +02:00
parent 9bc245e9e5
commit f0b51c22ee
6 changed files with 13 additions and 11 deletions

View File

@ -96,7 +96,7 @@
- name: "{{app_name}} - server log directory"
file:
path: "/var/log/{{server_app_name}}"
path: "{{log_dir}}"
state: directory
owner: "{{user}}"
group: "{{user}}"

View File

@ -5,8 +5,8 @@ environment={{settings_env_var}}="{{app_settings}}"
process_name={{server_app_name}}
user={{user}}
numprocs=1
stdout_logfile=/var/log/{{server_app_name}}/stdout.log
stderr_logfile=/var/log/{{server_app_name}}/stderr.log
stdout_logfile={{log_dir}}/stdout.log
stderr_logfile={{log_dir}}/stderr.log
autostart=true
autorestart=true

View File

@ -1,2 +1,3 @@
log_dir: "/var/log/{{server_app_name}}"
state_dir: "/var/lib/{{project_name}}"
tenants_dir: "/var/lib/{{project_name}}/tenants"

View File

@ -6,8 +6,8 @@ server {
ssl_certificate {{ssl_certificate}};
ssl_certificate_key {{ssl_certificate_key}};
access_log /var/log/nginx/{{project_name}}-access.log combined;
error_log /var/log/nginx/{{project_name}}-error.log;
access_log {{nginx_log_base}}-access.log combined;
error_log {{nginx_log_base}}-error.log;
client_max_body_size 50M;
@ -28,7 +28,7 @@ server {
server {
listen 80;
server_name {{nginx_host_pattern}};
access_log /var/log/nginx/{{project_name}}-access.log combined;
error_log /var/log/nginx/{{project_name}}-error.log;
access_log {{nginx_log_base}}-access.log combined;
error_log {{nginx_log_base}}-error.log;
return 301 https://$host$request_uri;
}

View File

@ -6,8 +6,8 @@ server {
ssl_certificate {{ssl_certificate}};
ssl_certificate_key {{ssl_certificate_key}};
access_log /var/log/nginx/{{project_name}}-access.log combined;
error_log /var/log/nginx/{{project_name}}-error.log;
access_log {{nginx_log_base}}-access.log combined;
error_log {{nginx_log_base}}-error.log;
location ~ ^/static/(.+)$ {
root /;
@ -38,7 +38,7 @@ server {
server {
listen 80;
server_name {{nginx_host_pattern}};
access_log /var/log/nginx/{{project_name}}-access.log combined;
error_log /var/log/nginx/{{project_name}}-error.log;
access_log {{nginx_log_base}}-access.log combined;
error_log {{nginx_log_base}}-error.log;
return 301 https://$host$request_uri;
}

View File

@ -1,2 +1,3 @@
nginx_log_base: "/var/log/nginx/{{server_app_name}}"
state_dir: "/var/lib/{{project_name}}"
tenants_dir: "/var/lib/{{project_name}}/tenants"