mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-12 23:35:50 +00:00
use standard path. add nginx example
This commit is contained in:
parent
f49cf4d7f8
commit
ac249b4683
@ -11,3 +11,7 @@ export NVM_DIR="/root/.nvm"
|
||||
|
||||
$NPM_BIN install
|
||||
$NPM_BIN run build
|
||||
# prezip for faster deliver throw nginx
|
||||
cd dist
|
||||
find . -type f -name "*.css" -exec gzip -9 -k {} \;
|
||||
find . -type f -name "*.js" -exec gzip -9 -k {} \;
|
||||
|
||||
73
deployment/bare_metal/nginx/sites-available/gradido
Normal file
73
deployment/bare_metal/nginx/sites-available/gradido
Normal file
@ -0,0 +1,73 @@
|
||||
server {
|
||||
server_name _;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
include /etc/nginx/common/protect.conf;
|
||||
include /etc/nginx/common/protect_add_header.conf;
|
||||
|
||||
root /var/www/html/gradido/community_server/webroot;
|
||||
index index.php;
|
||||
|
||||
gzip_static on;
|
||||
|
||||
|
||||
location ~ \.php$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /vue {
|
||||
alias /var/www/html/gradido/frontend/dist;
|
||||
index index.html;
|
||||
|
||||
location ~* \.(png)$ {
|
||||
expires 39d;
|
||||
}
|
||||
try_files $uri $uri/ /index.html = 404;
|
||||
}
|
||||
|
||||
location /account {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
rewrite /account/(.*) /$1 break;
|
||||
|
||||
proxy_pass http://127.0.0.1:1200;
|
||||
proxy_redirect off;
|
||||
|
||||
|
||||
}
|
||||
|
||||
location /login_api {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
rewrite /login_api/(.*) /$1 break;
|
||||
|
||||
proxy_pass http://127.0.0.1:1201;
|
||||
proxy_redirect off;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
}
|
||||
29
deployment/bare_metal/nginx/sites-available/gradido_updating
Normal file
29
deployment/bare_metal/nginx/sites-available/gradido_updating
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
server {
|
||||
server_name _;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
include /etc/nginx/common/protect.conf;
|
||||
include /etc/nginx/common/protect_add_header.conf;
|
||||
|
||||
root /var/www/html/;
|
||||
index updating.html;
|
||||
|
||||
location /account {
|
||||
alias /var/www/html/;
|
||||
index updating.html;
|
||||
}
|
||||
location /vue {
|
||||
alias /var/www/html/;
|
||||
index updating.html;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
}
|
||||
|
||||
1
deployment/bare_metal/nginx/updating_original.html
Normal file
1
deployment/bare_metal/nginx/updating_original.html
Normal file
@ -0,0 +1 @@
|
||||
Gradido Servers are updating..., please stand by and try again in some minutes
|
||||
@ -1,10 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
EMPTY_UPDATE_HTML=/var/www/html/admin/updating_original.html
|
||||
UPDATE_HTML=/var/www/html/admin/updating.html
|
||||
EMPTY_UPDATE_HTML=/var/www/html/updating_original.html
|
||||
UPDATE_HTML=/var/www/html/updating.html
|
||||
LOCK_FILE=/root/relay.lock
|
||||
#PROJECT_PATH=/var/www/html/gradido
|
||||
PROJECT_PATH=/root/code/gradido
|
||||
PROJECT_PATH=/var/www/html/gradido
|
||||
SITE_CONFIG=stage1
|
||||
UPDATE_SITE_CONFIG=stage1_updating
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user