Is it possible to send an application defined in Docker-Compose.yml to Heroku?

Asked

Viewed 562 times

1

Well, I have an application running on the Docker environment, but I use Docker-Composer.yml and not Dockerfile to define services, etc. Is it only possible to send an app if it is mounted on Dockerfile? I follow every step of Heroku’s documentation, which says send the service web (Heroku container:push web), my service is named as drupal. But I want to put into production something that is mounted using Docker-Compose.yml. It is possible?

$ Docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ccf70f9d1dac drupal:Latest "Docker-php-entrypoi..." 16 hours ago Up 8 minutes 0.0.0:80->80/tcp Drupal8 0251597bb10d mariadb:Latest "Docker-entrypoint. s..." 16 hours ago Up 8 minutes 0.0.0.0:3306->3306/tcp Mariadbdrupal

$ Heroku container:push Drupal8 --app ${aqui_app_no_heroku} No images to push

Example Docker-Composer.yml:


version: '3.1'

services:

  drupal:
    image: drupal:latest
    container_name: Drupal8
    ports:
      - 80:80
    volumes:
      - ./src:/var/www/html
    restart: always

  db:
    image: mariadb:latest
    container_name: MariaDbDrupal
    volumes:
     - ./db:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
    ports:
      - 3306:3306

In the case of the above simplified example, Docker-Compose.yml. Would you have to redo it in Dockerfile in order to climb to Heroku? Thank you!

  • heroku container:push web ...: for his commie has no service/container called web. You’re making a mistake doing push to the Registry?

  • @Brunocésar I edited the question. Hey! Push returns: No images to push

  • It was "web", because I had changed to follow the Heroku documentation, so I had changed(.yml) the name of the front end service from drupal to 'web'

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.