title: How to write an Ansible playbook with Docker-compose
body: <p>Please help, I have the docker-compose file below, and I want to write an Ansible playbook that runs the docker-compose file on localhost and a remote target.</p>
  
  <pre><code>   version: '2.0'
  
  services:
  weather-backend:
    build: ./backend
    volumes:    #map backend dir and package inside container
      - './backend/:/usr/src/'
      - './backend/package.json:/usr/src/package.json'
    #ports:
   #  - "9000:9000" #expose backend port - Host:container
    ports:
       - "9000:9000"
    command: npm start
  
  
  weather-frontend:
    build: ./frontend
    depends_on:
      - weather-backend
    volumes:
      - './frontend/:/usr/src/'
      - '/usr/src/node_modules'
    ports:
      - "8000:8000" #expose ports -Host:container
    environment:
      NODE_ENV: "development"
  </code></pre>