forked from meteorhacks/meteord
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce devbuild and restructured folder structure
- Loading branch information
Showing
19 changed files
with
90 additions
and
34 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
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,4 +1,6 @@ | ||
bash $METEORD_DIR/install_base.sh | ||
bash $METEORD_DIR/install_node.sh | ||
bash $METEORD_DIR/install_phantomjs.sh | ||
bash $METEORD_DIR/cleanup.sh | ||
set -e | ||
|
||
bash $METEORD_DIR/lib/install_base.sh | ||
bash $METEORD_DIR/lib/install_node.sh | ||
bash $METEORD_DIR/lib/install_phantomjs.sh | ||
bash $METEORD_DIR/lib/cleanup.sh |
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,22 @@ | ||
set -e | ||
|
||
COPIED_APP_PATH=/copied-app | ||
BUNDLE_DIR=/tmp/bundle-dir | ||
|
||
# sometimes, directly copied folder cause some wierd issues | ||
# this fixes that | ||
cp -R /app $COPIED_APP_PATH | ||
cd $COPIED_APP_PATH | ||
|
||
meteor build --directory $BUNDLE_DIR --server=http://localhost:3000 | ||
|
||
cd $BUNDLE_DIR/bundle/programs/server/ | ||
npm i | ||
|
||
mv $BUNDLE_DIR/bundle /built_app | ||
|
||
# cleanup | ||
rm -rf $COPIED_APP_PATH | ||
rm -rf $BUNDLE_DIR | ||
rm -rf ~/.meteor | ||
rm /usr/local/bin/meteor |
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
2 changes: 1 addition & 1 deletion
2
base/scripts/install_base.sh → base/scripts/lib/install_base.sh
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,4 +1,4 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
apt-get update -y | ||
apt-get install -y curl bzip2 |
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,3 @@ | ||
set -e | ||
|
||
curl https://install.meteor.com | /bin/sh |
2 changes: 1 addition & 1 deletion
2
base/scripts/install_node.sh → base/scripts/lib/install_node.sh
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,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
NODE_VERSION=0.10.36 | ||
NODE_ARCH=x64 | ||
|
||
|
1 change: 1 addition & 0 deletions
1
base/scripts/install_phantomjs.sh → base/scripts/lib/install_phantomjs.sh
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 |
---|---|---|
@@ -1,23 +1,5 @@ | ||
#!/bin/bash | ||
curl https://install.meteor.com | /bin/sh | ||
set -e | ||
|
||
COPIED_APP_PATH=/copied-app | ||
BUNDLE_DIR=/tmp/bundle-dir | ||
|
||
# sometimes, directly copied folder cause some wierd issues | ||
# this fixes that | ||
cp -R /app $COPIED_APP_PATH | ||
cd $COPIED_APP_PATH | ||
|
||
meteor build --directory $BUNDLE_DIR --server=http://localhost:3000 | ||
|
||
cd $BUNDLE_DIR/bundle/programs/server/ | ||
npm i | ||
|
||
mv $BUNDLE_DIR/bundle /built_app | ||
|
||
# cleanup | ||
rm -rf $COPIED_APP_PATH | ||
rm -rf $BUNDLE_DIR | ||
rm -rf ~/.meteor | ||
rm /usr/local/bin/meteor | ||
bash $METEORD_DIR/lib/install_meteor.sh | ||
bash $METEORD_DIR/lib/build_app.sh |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,6 @@ | ||
FROM meteorhacks/meteord:base | ||
MAINTAINER MeteorHacks Pvt Ltd. | ||
|
||
ONBUILD RUN bash $METEORD_DIR/lib/install_meteor.sh | ||
ONBUILD COPY ./ /app | ||
ONBUILD RUN bash $METEORD_DIR/lib/build_app.sh |
File renamed without changes.
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,4 +1,5 @@ | ||
#!/bin/bash | ||
docker build -t meteorhacks/meteord:base ../base | ||
docker build -t meteorhacks/meteord:on-build ../on-build | ||
docker build -t meteorhacks/meteord:bin-build ../bin-build | ||
docker build -t meteorhacks/meteord:onbuild ../onbuild | ||
docker build -t meteorhacks/meteord:devbuild ../devbuild | ||
docker build -t meteorhacks/meteord:binbuild ../binbuild |
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
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,31 @@ | ||
#!/bin/bash | ||
|
||
function clean() { | ||
docker rm -f meteor-app | ||
docker rmi -f meteor-app-image | ||
rm -rf hello | ||
} | ||
|
||
cd /tmp | ||
clean | ||
|
||
meteor create hello | ||
cd hello | ||
echo FROM meteorhacks/meteord:devbuild >> Dockerfile | ||
|
||
docker build -t meteor-app-image ./ | ||
docker run -d \ | ||
--name meteor-app \ | ||
-e ROOT_URL=http://yourapp_dot_com \ | ||
-p 8080:80 \ | ||
meteor-app-image | ||
|
||
sleep 5 | ||
|
||
appContent=`curl http://localhost:8080` | ||
clean | ||
|
||
if [[ $appContent != *"yourapp_dot_com"* ]]; then | ||
echo "Failed: Meteor app" | ||
exit 1 | ||
fi |