'Problem to deploy to Heroku using Docker-Compose
I'm trying to deploy my code into Heroku, I’m using Docker Compose, and is getting hard to do it, I already read this link: https://devcenter.heroku.com/articles/local-development-with-docker-compose but I still have problems on how to solve it.
I have the files "docker-compose.yml" (contains Postgres DB on a volume and an application in Python (FastApi) in another volume) and "heroku.yml", but I couldn’t deploy the docker compose to Heroku.
"docker-compose.yml":
build:
docker:
web: ./backend/Dockerfile
version: '3.8'
services:
server:
build:
context: ./backend
dockerfile: ./Dockerfile
volumes:
- ./backend/:/backend/
command: uvicorn app.main:app --proxy-headers --workers 1 --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
depends_on:
- db
db:
image: postgres:13-alpine
container_name: db
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- "5433:5432"
environment:
- POSTGRES_USER=****
- POSTGRES_PASSWORD=****
- POSTGRES_DB=****
volumes:
postgres_data:
Thank you very much!!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
