3

I am struggling to work out what I need to do to get this up an running on Heroku. I normally have a Procfile that has information for Heroku for the Gunicorn app for my Python build. But as this Dockerfile has 4 containers I am guessing it would need 4 dynos. How would I edit my Procfile or do I need a heroku.yml?

My docker-compose.yml file is:

version: '3'

services:
  frontend:
    image: frontend:0.21
    build:
      context: .
      dockerfile: './Docker/Dockerfile.frontend'
    ports:
      - "5000:5000"
  notification:
    image: notification:0.21
    build:
      context: .
      dockerfile: './Docker/Dockerfile.notification'
    ports:
      - "5002:5002"
  user:
    image: user:0.21
    build: 
      context: .
      dockerfile: './Docker/Dockerfile.user'
    ports:
      - "5003:5003"
  stripe:
    image: stripe:0.21
    build:   
      context: .
      dockerfile: './Docker/Dockerfile.stripe'
    ports:
      - "5004:5004"
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
DidSquids
  • 149
  • 1
  • 8

1 Answers1

0

The heroku.yml is an option if you have one single Web dyno (accepting HTTP requests) and multiple workers (background processes). Here is an example.

In case you want multiple Web dynos you need to create an Heroku app for each one. There is no support for docker-compose.yml so the alternative is to build/push each Dockerfile.
It might sound cumbersome but this can easily be done in CI/CD, check out this repository on Github.

Beppe C
  • 11,256
  • 2
  • 19
  • 41