forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ives van Hoorne
committed
Dec 23, 2016
1 parent
94c879f
commit 234accd
Showing
8 changed files
with
61 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
.vscode | ||
deploy.sh | ||
Dockerfile | ||
Dockerfile.prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# testing | ||
coverage | ||
|
||
# production | ||
build | ||
www | ||
.deliver | ||
|
||
# misc | ||
.DS_Store | ||
npm-debug.log | ||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
docker build -t codesandbox/prod/client --file Dockerfile.prod . | ||
id=$(docker create codesandbox/prod/client) | ||
rm -rf .deliver | ||
mkdir .deliver | ||
mkdir .deliver/www | ||
docker cp $id:/app/www/ ./.deliver/ | ||
docker rm -v $id | ||
|
||
|
||
echo "Tarring build files" | ||
tar -C .deliver -zcvf .deliver/code_sandbox_client.tar.gz www | ||
|
||
echo "Cleaning remote tar" | ||
ssh nginx@codesandbox.io "rm -f code_sandbox_client.tar.gz" | ||
|
||
echo "Moving tar to server" | ||
scp .deliver/code_sandbox_client.tar.gz nginx@codesandbox.io:./ | ||
|
||
echo "Cleaning WWW" | ||
ssh nginx@codesandbox.io "rm -rf www" | ||
|
||
echo "Untarring www files" | ||
ssh nginx@codesandbox.io "tar -xzf ./code_sandbox_client.tar.gz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/bin/bash | ||
|
||
yarn | ||
npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters