How to deploy app with Docker Compose + React + Django + Nginx?

I'm building an app using Docker Compose, React, Django and Nginx. After struggling for a few days I managed to set up a docker-compose file that successfully connected all these services, from collecting the React static files and having Nginx serve them, to having Nginx point to the Django static files instead of Django serving them, to adding other services like Celery to the Docker Compose config.

However, it seems like there's no easy place to publish + deploy this container (the Docker registry doesn't accept containers I think?). All I could find was Azure and AWS integrations, which are definitely a step up from the Heroku deployment I was doing before. My Heroku no longer works as it needs the React + Django to all be at the same depth level of folders, or it doesn't let me use the 'heroku/nodejs' buildpack. Is there a deployment option that lets me maintain the separate folder structure + ease of development of Docker Compose, without being as complex as Azure and AWS? Thanks in advance!

You can upload your container to heroku container registry

https://devcenter.heroku.com/categories/deploying-with-docker

add a heroku.yml file

build:
  docker:
    web: Dockerfile
run:
  web: bundle exec puma -C config/puma.rb

then with the heroku-cli

heroku create
heroku container:push web
Back to Top