box: ruby

build:
  steps:
    - bundle-install

deploy:
  # box: ubuntu
  vultr:
    - internal/docker-push:
        username: $DOCKERHUB_USERNAME
        password: $DOCKERHUB_PASSWORD
        tag: test2
        repository: webwurst/parkleitsystemapi
        registry: https://registry.hub.docker.com
    - script:
        name: deploy
        code: echo default deploy
    - add-to-known_hosts:
        hostname: 104.238.158.210
    - mktemp:
        envvar: PRIVATEKEY_PATH
    - create-file:
        name: write key
        filename: $PRIVATEKEY_PATH
        content: $VULTR_PRIVATE
        overwrite: true
        hide-from-log: true
    - script:
        name: pull image
        code: ssh -i $PRIVATEKEY_PATH -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 104.238.158.210 docker pull webwurst/parkleitsystemapi:test2
    - script:
        name: restart docker-compose
        code: |
          ssh -i $PRIVATEKEY_PATH -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 104.238.158.210 /bin/bash << EOF
            docker-compose -f /root/wercker/parkleitsystem-api/docker-compose.yml restart
            docker-compose -f /root/wercker/parkleitsystem-api/docker-compose.yml start
          EOF

box: ruby

build:
  steps:
    - bundle-install

deploy:
  # box: ubuntu
  vultr:
    - internal/docker-push:
        username: $DOCKERHUB_USERNAME
        password: $DOCKERHUB_PASSWORD
        tag: test2
        repository: webwurst/parkleitsystemapi
        registry: https://registry.hub.docker.com
        cmd: clockwork clock.rb
    - script:
        name: deploy
        code: echo default deploy
    - add-to-known_hosts:
        hostname: 104.238.158.210
    - mktemp:
        envvar: PRIVATEKEY_PATH
    - create-file:
        name: write key
        filename: $PRIVATEKEY_PATH
        content: $VULTR_PRIVATE
        overwrite: true
        hide-from-log: true
    - script:
        name: pull image
        code: ssh -i $PRIVATEKEY_PATH -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 104.238.158.210 docker pull webwurst/parkleitsystemapi:test2
    - script:
        name: restart docker-compose
        code: |
          ssh -i $PRIVATEKEY_PATH -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 104.238.158.210 /bin/bash << EOF
            docker-compose -f /root/wercker/parkleitsystem-api/docker-compose.yml restart
            docker-compose -f /root/wercker/parkleitsystem-api/docker-compose.yml up
          EOF

Add cmd parameter to builded docker image
Add cmd parameter to builded docker image
