diff --git a/Procfile b/Procfile deleted file mode 100644 index 50d149b..0000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -index-regen: python main.py diff --git a/heroku.Dockerfile b/heroku.Dockerfile new file mode 100644 index 0000000..0e8586b --- /dev/null +++ b/heroku.Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.9 + +# Install dependencies +RUN apt-get update +RUN apt-get install curl libpq-dev postgresql-client nodejs yarnpkg -y + +# Set working directory +WORKDIR /home/indexer + +# Copy source code +COPY . . + +# Install indexer and pin the version of poetry +RUN pip3 install poetry==1.6.1 +RUN poetry install +# the heroku.yml 'run' directive is incompatible with poetry +# so we export to the requirements.txt format and use pip3 +RUN poetry export --without-hashes --format=requirements.txt > requirements.txt +RUN pip3 install -r requirements.txt +RUN yarnpkg install diff --git a/heroku.yml b/heroku.yml new file mode 100644 index 0000000..837d9fe --- /dev/null +++ b/heroku.yml @@ -0,0 +1,9 @@ +build: + docker: + indexer: heroku.Dockerfile +run: + indexer: python main.py +release: + image: indexer + command: + - PGSSLMODE=no-verify yarnpkg migrate