image: docker

services:
  - docker:dind

stages:
  - deploy

step-deploy-prod:
  stage: deploy
  only:
    - master
  script:
    - sudo apt-get install -y python-pip
    - sudo pip install docker-compose
    - sudo docker image prune -f
    - sudo docker-compose build --no-cache
    - sudo docker-compose up -d
  environment: master 