Skip to content

Commit

Permalink
Merge pull request #379 from ggwadera/docker
Browse files Browse the repository at this point in the history
Run apps inside Docker containers
  • Loading branch information
songz authored Sep 6, 2020
2 parents 975d75d + 6ee578f commit bbdabe7
Show file tree
Hide file tree
Showing 9 changed files with 461 additions and 144 deletions.
182 changes: 179 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@types/node-fetch": "^2.5.0",
"@types/uuid": "^3.4.5",
"cookie-parser": "^1.4.4",
"dockerode": "^3.2.1",
"dotenv": "^8.1.0",
"ejs": "^2.6.2",
"express": "^4.17.1",
Expand All @@ -48,6 +49,7 @@
"uuid": "^3.3.3"
},
"devDependencies": {
"@types/dockerode": "^2.5.34",
"@types/jest": "^24.0.17",
"@types/node": "^12.7.1",
"@typescript-eslint/eslint-plugin": "^2.0.0",
Expand Down
5 changes: 4 additions & 1 deletion scripts/post-receive
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/sh
cd ..
GIT_DIR='.git'
DOMAIN=$(basename $(pwd))
umask 002 && git reset --hard
git clean -f
git checkout master
git branch -D prod
npm install
sudo -u myproxy pm2 startOrRestart deploy.config.js --env production --update-env
echo "Starting the container..."
curl --silent --unix-socket /var/run/docker.sock -X POST "http:/localhost/containers/${DOMAIN}/restart"
echo "Your app is running at https://${DOMAIN}"
Loading

0 comments on commit bbdabe7

Please sign in to comment.