For the past 2 days, I have been consistently trying out different methods of deploying my multi-container app to Heroku via Travis CI. Heroku shows a weird error when I deploy my application from Travis CI.
Here's my
docker-compose.yml:
version: '3'
services:
db:
image: mysql:5.7
ports:
- '3306:3306'
environment:
MYSQL_DATABASE: 'mysql'
MYSQL_USER: 'root'
MYSQL_PASSWORD: 'root'
MYSQL_ROOT_PASSWORD: 'root'
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/covid_analysis
ports:
- "8000:8000"
depends_on:
- db
After deploying with this configuration, my Travis CI build shows a weird error:
After some Google search, I found a GitHub issue about this problem, which suggests deploying with entrypoint rather than cmd/command.
Therefore, I did change my command: python manage.py runserver 0.0.0.0:8000
to entrypoint: python manage.py runserver 0.0.0.0:8000
.
This time, Travis build errored like this:
Here is my latest docker-compose.yml and Dockerfile I have Googled a lot of things, and I was not able to find anything that could solve my problem (or even explain why it's not working). All the builds work fine locally. The code is available on GitHub.