title: Docker Compose Continuous Deployment setup
body: <p>I am looking for a way to deploy <code>docker-compose</code> images and / or builds to a remote sever, specifically but not limited to a DigitalOcean VPS.</p>
  
  <p><code>docker-compose</code> is currently working on the CircleCI Continuous Integration service, where it automatically verifies that tests pass. But, it <strong>should deploy automatically on success</strong>.</p>
  
  <p>My <code>docker-compose.yml</code> is looking like this:</p>
  
  <pre><code>version: '2'
  services:
    web:
      image: name/repo:latest
      ports:
        - "3000:3000"
      volumes:
        - /app/node_modules
        - .:/app
      depends_on: 
        - mongo
        - redis
    mongo:
      image: mongo
      command: --smallfiles
      volumes:
        - ./data/mongodb:/data/db
    redis:
      image: redis
      volumes:
        - ./data/redis:/data
  </code></pre>
  
  <p><code>docker-compose.override.yml</code>:</p>
  
  <pre><code>version: '2'
  services:
    web:
      build: .
  </code></pre>
  
  <p><code>circle.yml</code> relevant part:</p>
  
  <pre><code>deployment:
    latest:
      branch: master
      commands:
        - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
        - docker push name/repo:$CIRCLE_SHA1
        - docker push name/repo:latest
  </code></pre>