Skip to content

Instantly share code, notes, and snippets.

@jkrup
Created July 10, 2016 15:36
Show Gist options
  • Save jkrup/7913365400fd3de24204352b466b60af to your computer and use it in GitHub Desktop.
Save jkrup/7913365400fd3de24204352b466b60af to your computer and use it in GitHub Desktop.
Very basic CircleCI config for MeteorJS on Docker using rsync (capable of deploying MeteorJS on AliCloud servers)
machine:
node:
version: 0.10.35
services:
- docker
dependencies:
pre:
- docker build -t mazlix/testci .
test:
override:
- docker run -d -e ROOT_URL=http://localhost -p 80:80 mazlix/testci; sleep 10
- curl --retry 10 --retry-delay 5 -v http://localhost
deployment:
prod:
branch: master
commands:
- mkdir -p ~/docker; docker save mazlix/testci > ~/docker/image.tar
- rsync -zP ~/docker/image.tar root@198.199.92.163:~
- ssh root@198.199.92.163 "docker kill \$(docker ps -q); docker load -i image.tar; docker run -d -e ROOT_URL=http://testci.bokuga.com -p 80:80 mazlix/testci"
- rsync -zP ~/docker/image.tar root@101.201.38.83:~
- ssh root@101.201.38.83 "docker kill \$(docker ps -q); docker load -i image.tar; docker run -d -e ROOT_URL=http://testci.bokuga.com -p 80:80 mazlix/testci"
@jkrup
Copy link
Author

jkrup commented Jul 10, 2016

You would need to update this with your IP addresses of your own servers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment