title: deploy docker to heroku without using heroku docker plugin
body: <p>Say I'm working on a web project that runs gitlab-ci shell runner on my own ci server to build docker and deploy it to heroku, and I've gone through some docs from both gitlab and heroku like <a href="http://doc.gitlab.com/ci/docker/using_docker_build.html" rel="nofollow">gitlab-ci: using docker build</a> and <a href="https://devcenter.heroku.com/articles/docker" rel="nofollow">heroku:Build and Deploy with Docker</a>. Can I deploy the docker project without using heroku-docker plugin, which seems not so flexible to me? However I tried, the following approach build succeeded in deploying to heroku, but the app crash. Heroku logs says <code>start</code> script is missing in package.json, but since I'm deploying docker project, I couldn't do <code>"start": "docker-compose up"</code> there, could I?</p>
  
  <pre><code>    #.gitlab-ci.yml
      stages:
        - deploy
      before_script:
        - npm install
        - bower install
      dev:
        stage: deploy
        script:
          - docker-compose run nginx run-test
          - gem install dpl
          - dpl --provider=heroku --app=xixi-web-dev --api-key=$HEROKU_API_KEY
        only:
          - dev
  </code></pre>
  
  <hr>
  
  <pre><code>    # docker-compose.yml
      app:
        build: .
        volumes:
          - .:/code:ro
        expose:
          - "3000"
        working_dir: /code
        command: pm2 start app.dev.json5
  
      nginx:
        build: ./setup/nginx
        restart: always
        volumes:
          - ./setup/nginx/sites-enabled:/etc/nginx/sites-enabled:ro
          - ./dist:/var/app:ro
        ports:
          - "$PORT:80"
        links:
          - app
  </code></pre>
  
  <hr>
  
  <p>I don't want to use heroku docker plugin, because it seems less flexible, I can't create a <code>app.json</code> because I don't want to use an existing docker image for my app. Instead, I define  custom <code>Dockerfile</code>s for <code>app</code> and <code>nginx</code> used in <code>docker-compose.yml</code></p>
  
  <hr>
  
  <p>Now it seems that heroku wouldn't detect my project as a docker project unless I deploy it by using heroku docker plugin, but as I mentioned above, I can't do that. Then is there any docs I'm missing on heroku or gitlab could help me out? Or do you have any idea that might be helpful? Thanks a lot!</p>