Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
multi nodes
Browse files Browse the repository at this point in the history
Signed-off-by: ta-koge <ta-koge@global-mobility-service.com>
  • Loading branch information
ta-koge committed Sep 7, 2019
1 parent f57b6f4 commit dda39a5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
3 changes: 1 addition & 2 deletions conf/nginx.conf
Expand Up @@ -70,8 +70,7 @@ http {

location / {
proxy_set_header Host $http_host;
# proxy_pass http://app;
proxy_pass http://isucon1;
proxy_pass http://app;
}
}
}
6 changes: 3 additions & 3 deletions deploy-all.sh
@@ -1,5 +1,5 @@
#/bin/bash -ex

ssh isucon@isucon01 /home/isucon/isucari/webapp/nodejs/deploy.sh
ssh isucon@isucon02 /home/isucon/isucari/webapp/nodejs/deploy.sh
ssh isucon@isucon03 /home/isucon/isucari/webapp/nodejs/deploy.sh
ssh isucon@isucon01 /home/isucon/isucari/webapp/nodejs/deploy01.sh
ssh isucon@isucon02 /home/isucon/isucari/webapp/nodejs/deploy0203.sh
ssh isucon@isucon03 /home/isucon/isucari/webapp/nodejs/deploy0203.sh
15 changes: 15 additions & 0 deletions webapp/nodejs/deploy01.sh
@@ -0,0 +1,15 @@
#!/bin/bash -ex

cd /home/isucon/isucari/webapp/nodejs
git pull origin master

sudo cp ../../conf/nginx.conf /etc/nginx
sudo systemctl restart nginx.service

sudo cp ../../conf/my.cnf /etc/mysql
sudo systemctl restart mysql.service
/home/isucon/isucari/webapp/sql/init.sh

sudo systemctl daemon-reload

sudo bash -c 'echo > /var/log/nginx/access.log; echo > /var/log/mysql/slow.log;'
13 changes: 13 additions & 0 deletions webapp/nodejs/deploy0203.sh
@@ -0,0 +1,13 @@
#!/bin/bash -ex

cd /home/isucon/isucari/webapp/nodejs
git pull origin master

/home/isucon/local/node/bin/npm i

/home/isucon/isucari/webapp/nodejs/node_modules/.bin/tsc

sudo cp ../../conf/isucari.nodejs.service /etc/systemd/system/

sudo systemctl daemon-reload
sudo systemctl restart isucari.nodejs.service

0 comments on commit dda39a5

Please sign in to comment.