Skip to content

Commit

Permalink
Fixed frontend deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Salim Djerbouh <13698160+CaddyDz@users.noreply.github.com>
  • Loading branch information
CaddyDz committed Jun 30, 2023
1 parent 64c156b commit de990e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
11 changes: 6 additions & 5 deletions frontend/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cd /home/forge/staging.kingboosting.com
cd /home/forge/kingboosting.dsalim.dev
git checkout .
git pull origin develop
npm install --production
npm run build --no-lock
pm2 start npm --name "staging.kingboosting.com" --watch -- start
git pull origin $FORGE_SITE_BRANCH
# npm install
# npm run build
# pm2
# pm2 restart kingboosting.dsalim.dev
17 changes: 10 additions & 7 deletions frontend/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/eloboost.app/before/*;
include forge-conf/kingboosting.dsalim.dev/before/*;

map $sent_http_content_type $expires {
"text/html" epoch;
Expand All @@ -10,18 +10,20 @@ map $sent_http_content_type $expires {
server {
listen 80;
listen [::]:80;
server_name eloboost.app;
server_name kingboosting.dsalim.dev;
server_tokens off;
root /home/forge/eloboost.app/;
root /home/forge/kingboosting.dsalim.dev/frontend/;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

index index.html index.htm;

charset utf-8;

# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/eloboost.app/server/*;
include forge-conf/kingboosting.dsalim.dev/server/*;

location / {
expires $expires;
Expand All @@ -33,15 +35,16 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
proxy_pass http://127.0.0.1:3000; # set the address of the Node.js
proxy_pass http://127.0.0.1:3301; # set the address of the Node.js
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

access_log off;
error_log /var/log/nginx/eloboost.app-error.log error;
error_log /var/log/nginx/kingboosting.dsalim.dev-error.log error;
}

# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/eloboost.app/after/*;
include forge-conf/kingboosting.dsalim.dev/after/*;

1 change: 1 addition & 0 deletions frontend/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import router from "./config/router";
import plugins from "./config/plugins";

export default {
server: { port: 3301, },
vue: {
config: {
productionTip: false,
Expand Down

0 comments on commit de990e5

Please sign in to comment.