Can't change dyno with Procfile on Heroku

96 views Asked by At

I'm trying to deploy django project to Heroku using docker image. My Procfile contains command:

web: gunicoron myProject.wsgi

But when I push and release to heroku - somewhy dyno process command according to a dashboard is

web: python3

Command heroku ps tells

web.1: crashed

And I can not change it anyhow. Any manipulation with Procfile doesn't work.

When I deploy the same project with git - everything works fine. But why heroku container deploy does not work. Everything done following heroku instruction.

My Dockerfile:

FROM python:3

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

WORKDIR /app

COPY requirements.txt /app/

RUN pip install -r requirements.txt

COPY . /app/

My docker-compose.yml:

version: "3.9"

services:

  db:
    image: postgres
    volumes:
      - ./data/db:/var/lib/postgresql/data
    # ports:
    #   - "5432:5432"
    environment:
      - POSTGRES_DB=${SQL_NAME}
      - POSRGRES_USER=${SQL_USER}
      - POSTGRES_PASSWORD=${SQL_PASSWORD}

  web:
    build: .
    # command: python manage.py runserver 0.0.0.0:8000
    command: gunicorn kereell.wsgi --bind 0.0.0.0:8000
    volumes:
      - .:/code
    ports:
      - "8000:8000"
    # env_file: .env
    environment:
      - DEBUG=${DEBUG}
      - SECRET_KEY=${SECRET_KEY}
      - DB_ENGINE=${SQL_ENGINE}
      - DB_NAME=${SQL_NAME}
      - DB_USER=${SQL_USER}
      - DB_PASSWD=${SQL_PASSWORD}
      - DB_HOST=${SQL_HOST}
      - DB_PORT=${SQL_PORT}
    depends_on:
      - db

My requirements.txt:

Django
psycopg2
gunicorn

Please help me resolve this. Thanks in advance.

0

There are 0 answers