build:
  image: clojure
  commands:
    - apt-get install curl
    - curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
    - apt-get install -y nodejs
    - lein cljsbuild test
deploy:
  rsync:
    user: $$PROD_USER
    host: $$PROD_HOST
    port: 22
    source: ./docker-compose.yml
    target: /tmp/$$COMMIT/
    delete: false
    commands:
      - docker-compose -f /tmp/$$COMMIT/docker-compose.yml pull
      - docker-compose -f /tmp/$$COMMIT/docker-compose.yml -p russyll up -d
    when:
      branch: master

publish:
  docker:
    username: $$DOCKER_USERNAME
    password: $$DOCKER_PASSWORD
    email: $$DOCKER_EMAIL
    storage_driver: vfs
    repo: omelhoro1/russyll
    when:
      branch: master

build:
  image: clojure
  commands:
    - apt-get install curl
    - curl --silent --location https://deb.nodesource.com/setup_7.x | bash -
    - apt-get install -y nodejs
    - npm i
    - NODE_PATH=./node_modules lein cljsbuild test
deploy:
  rsync:
    user: $$PROD_USER
    host: $$PROD_HOST
    port: 22
    source: ./docker-compose.yml
    target: /tmp/$$COMMIT/
    delete: false
    commands:
      - docker-compose -f /tmp/$$COMMIT/docker-compose.yml pull
      - docker-compose -f /tmp/$$COMMIT/docker-compose.yml -p russyll up -d
    when:
      branch: master

publish:
  docker:
    username: $$DOCKER_USERNAME
    password: $$DOCKER_PASSWORD
    email: $$DOCKER_EMAIL
    storage_driver: vfs
    repo: omelhoro1/russyll
    when:
      branch: master

Add npm install && fix nodepath problem
Add npm install && fix nodepath problem
