Skip to content

Commit

Permalink
[CYB-140] Autodeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
mrNote23 committed Sep 8, 2023
1 parent 22f8c6e commit 38a6438
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ http {
http2 on;
ssi on;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
add_header Content-Security-Policy "default-src 'self'; connect-src 'self' https://validator.swagger.io; font-src 'self';img-src 'self' data: https://validator.swagger.io; script-src 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'";
add_header Content-Security-Policy "default-src 'self'; connect-src 'self' https://validator.swagger.io; font-src 'self';img-src 'self' data: https://validator.swagger.io; script-src 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'; frame-src https://youtube.com https://www.youtube.com;";
add_header X-Frame-Options "DENY";
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options nosniff;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dev:ssr": "lerna run ssr --scope=client",
"dev:server": "lerna run dev --scope=server",
"dev": "lerna run dev",
"deploy": "rsync -av --exclude={'node_modules','dist','.git','tmp','uploads','.idea','ssl','yarn.lock'} . [email protected]:/home/cyb/",
"deploy": "rsync -av --exclude={'node_modules','dist','.git','tmp','uploads','.idea','ssl','yarn.lock'} . [email protected]:/home/cyb/ && ssh [email protected] 'cd /home/cyb/ && ./rebuild.sh'",
"test": "lerna run test",
"lint": "lerna run lint",
"format": "lerna run format",
Expand Down
8 changes: 8 additions & 0 deletions rebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker image rm cyb-client cyb-server cyb-nginx
docker-compose build nginx server client
docker-compose up -d
echo "***************************************************"
echo "*** site has been rebuilt ***"
echo "***************************************************"

0 comments on commit 38a6438

Please sign in to comment.