meteorhacks / meteord

MeteorD - Docker Runtime for Meteor Apps for Production Deployments
https://registry.hub.docker.com/u/meteorhacks/meteord/
MIT License
438 stars 371 forks source link

automatically build linux? #55

Open JulianKingman opened 9 years ago

JulianKingman commented 9 years ago

Is there a way to add-platform linux so that I don't have to type this in: meteor build --architecture=os.linux.x86_64 ./ and can just do meteor build --server=example.com? I understand (I think) that if I build it from within a linux distro it will do this automatically, but it seems like there should be a way to have it automatically build for linux.

hanselke commented 9 years ago

if you are building on local machine and want to have it sent to your server for deployment, you can use https://github.com/arunoda/meteor-up

On Fri, Nov 6, 2015 at 3:59 AM, JulianKingman notifications@github.com wrote:

Is there a way to add-platform linux so that I don't have to type this in: meteor build --architecture=os.linux.x86_64 ./ and can just do meteor build --server=example.com? I understand (I think) that if I build it from within a linux distro it will do this automatically, but it seems like there should be a way to have it automatically build for linux.

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/meteord/issues/55.

Hansel Ke CEO Open Business Solutions

JulianKingman commented 9 years ago

Interesting, can you clarify how to set that up for docker? It's unclear to me how they can work together.

Thanks!

PS - right now I just have the .tar in my public dropbox

hanselke commented 9 years ago

Right, sorry forgot this was a meteord based thread :P

Easy option 1) meteor build/bundle , then scp app into host and start it with docker

nextaction_setup() { echo $CUSTOMER_HOST_NAME echo $MONGO_URL cd ~/Deployments/$CUSTOMER_ID meteor bundle --architecture os.linux.x86_64 /tmp cd ~/Infrastructure

ssh -o "StrictHostKeyChecking no" -i $PRIVATE_KEY

root@$PRODUCTION_BPM_HOST_NAME /bin/bash -c "' docker rm -f "$CUSTOMER_ID" &> /dev/null mkdir /opt/"$CUSTOMER_ID" '" scp -o "StrictHostKeyChecking no" -i $PRIVATE_KEY /tmp/"$CUSTOMER_ID".tar.gz root@ $PRODUCTION_BPM_HOST_NAME:/opt/$CUSTOMER_ID/"$CUSTOMER_ID".tar.gz

ssh -o "StrictHostKeyChecking no" -i $PRIVATE_KEY

root@$PRODUCTION_BPM_HOST_NAME /bin/bash -c "' docker run --restart=always --name "$CUSTOMER_ID" --link=mongo -d -e VIRTUAL_HOST="$CUSTOMER_HOST_NAME" -e ROOT_URL='https://'"$CUSTOMER_HOST_NAME" -e MONGO_URL="$MONGO_URL" -e REBULD_NPM_MODULES=1 -v /etc/localtime:/etc/localtime -v /opt/"$CUSTOMER_ID"/:/bundle -p 80 meteorhacks/meteord:binbuild '"

more ideal option 2) pull based docker image updates

git push your code to code repo > quay.io builds docker image > production server pulls image whenever its rebuilt ( https://github.com/CenturyLinkLabs/watchtower)

I'm currently waiting for watchtower to handle private repos.

On Fri, Nov 6, 2015 at 9:44 PM, JulianKingman notifications@github.com wrote:

Interesting, can you clarify how to set that up for docker? It's unclear to me how they can work together.

Thanks!

PS - right now I just have the .tar in my public dropbox

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/meteord/issues/55#issuecomment-154413229.

Hansel Ke CEO Open Business Solutions