如何通过travis ci将多容器应用程序部署到heroku

时间:2018-11-16 09:45:42

标签: docker heroku containers travis-ci

嘿,我正在使用travis ci,我不明白我必须在travis yml中写什么才能将多个容器部署到heroku中 这是我的travis.yml

sudo: required
services:
  - docker

before_install:
  - docker build -t 307949230/client-test -f ./client/Dockerfile.dev ./client

script:
  - docker run 307949230/client-test npm test -- --coverage

after_success:
  - docker build -t 307949230/mern-client ./client
  - docker build -t 307949230/mern-nginx ./nginx
  - docker build -t 307949230/mern-server ./server
  # Log in to the docker CLI
  - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
  # Take those images and push them to docker hub
  - docker push 307949230/mern-client
  - docker push 307949230/mern-nginx
  - docker push 307949230/mern-server

0 个答案:

没有答案