define pm2 log paths

This commit is contained in:
Ulf Gebhardt 2022-01-16 10:57:05 +01:00
parent da63312f65
commit 1422563c2a
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
6 changed files with 17 additions and 16 deletions

View File

@ -1,3 +1,5 @@
GRADIDO_LOG_PATH=/home/gradido/gradido/deployment/bare_metal/log
# start script
DEPLOY_SEED_DATA=false
@ -10,7 +12,6 @@ NGINX_SSL_CERTIFICATE_KEY=/etc/letsencrypt/live/stage1.gradido.net/privkey.pem
NGINX_SSL_DHPARAM=/etc/letsencrypt/ssl-dhparams.pem
NGINX_SSL_INCLUDE=/etc/letsencrypt/options-ssl-nginx.conf
NGINX_UPDATE_PAGE_ROOT=/home/gradido/gradido/deployment/bare_metal/nginx/update-page
NGINX_LOG_PATH=/home/gradido/gradido/deployment/bare_metal/log
# webhook
WEBHOOK_GITHUB_SECRET=secret

View File

@ -52,7 +52,7 @@ server {
proxy_pass http://127.0.0.1:3000;
proxy_redirect off;
access_log $NGINX_LOG_PATH/nginx-access.frontend.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.frontend.log gradido_log;
}
# Backend
@ -67,7 +67,7 @@ server {
proxy_pass http://127.0.0.1:4000;
proxy_redirect off;
access_log $NGINX_LOG_PATH/nginx-access.backend.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.backend.log gradido_log;
}
# Backend webhooks
@ -82,14 +82,14 @@ server {
proxy_pass http://127.0.0.1:4000/hook;
proxy_redirect off;
access_log $NGINX_LOG_PATH/nginx-access.backend.hook.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.backend.hook.log gradido_log;
}
# Webhook reverse proxy
location /hooks/ {
proxy_pass http://127.0.0.1:9000/hooks/;
access_log $NGINX_LOG_PATH/nginx-access.hooks.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.hooks.log gradido_log;
}
# Admin Frontend
@ -104,7 +104,7 @@ server {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
access_log $NGINX_LOG_PATH/nginx-access.admin.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.admin.log gradido_log;
}
# TODO this could be a performance optimization

View File

@ -37,7 +37,7 @@ server {
proxy_pass http://127.0.0.1:3000;
proxy_redirect off;
access_log $NGINX_LOG_PATH/nginx-access.frontend.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.frontend.log gradido_log;
}
# Backend
@ -52,7 +52,7 @@ server {
proxy_pass http://127.0.0.1:4000;
proxy_redirect off;
access_log $NGINX_LOG_PATH/nginx-access.backend.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.backend.log gradido_log;
}
# Backend webhooks
@ -68,14 +68,14 @@ server {
proxy_pass http://127.0.0.1:4000/hook;
proxy_redirect off;
access_log $NGINX_LOG_PATH/nginx-access.backend.hook.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.backend.hook.log gradido_log;
}
# Webhook reverse proxy
location /hooks/ {
proxy_pass http://127.0.0.1:9000/hooks/;
access_log $NGINX_LOG_PATH/nginx-access.hooks.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.hooks.log gradido_log;
}
# Admin Frontend
@ -90,7 +90,7 @@ server {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
access_log $NGINX_LOG_PATH/nginx-access.admin.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.admin.log gradido_log;
}
# TODO this could be a performance optimization

View File

@ -31,6 +31,6 @@ server {
try_files /updating.html =404;
}
access_log $NGINX_LOG_PATH/nginx-access.update-page.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.update-page.log gradido_log;
}

View File

@ -16,6 +16,6 @@ server {
try_files /updating.html =404;
}
access_log $NGINX_LOG_PATH/nginx-access.update-page.log gradido_log;
access_log $GRADIDO_LOG_PATH/nginx-access.update-page.log gradido_log;
}

View File

@ -82,7 +82,7 @@ cd $PROJECT_ROOT/backend
yarn install
yarn build
pm2 delete gradido-backend
pm2 start --name gradido-backend "yarn --cwd $PROJECT_ROOT/backend start"
pm2 start --name gradido-backend "yarn --cwd $PROJECT_ROOT/backend start" -o $GRADIDO_LOG_PATH/pm2.backend.log -e $GRADIDO_LOG_PATH/pm2.backend.error.log
pm2 save
# Install & build frontend
@ -91,7 +91,7 @@ cd $PROJECT_ROOT/frontend
yarn install
yarn build
pm2 delete gradido-frontend
pm2 start --name gradido-frontend "yarn --cwd $PROJECT_ROOT/frontend start"
pm2 start --name gradido-frontend "yarn --cwd $PROJECT_ROOT/frontend start" -o $GRADIDO_LOG_PATH/pm2.frontend.log -e $GRADIDO_LOG_PATH/pm2.frontend.error.log
pm2 save
# Install & build admin
@ -100,7 +100,7 @@ cd $PROJECT_ROOT/admin
yarn install
yarn build
pm2 delete gradido-admin
pm2 start --name gradido-admin "yarn --cwd $PROJECT_ROOT/admin start"
pm2 start --name gradido-admin "yarn --cwd $PROJECT_ROOT/admin start" -o $GRADIDO_LOG_PATH/pm2.admin.log -e $GRADIDO_LOG_PATH/pm2.admin.error.log
pm2 save
# let nginx showing gradido