-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use heroku.yml and run migrations in release phase (#50)
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
build: | ||
docker: | ||
indexer: heroku.Dockerfile | ||
run: | ||
indexer: python main.py | ||
release: | ||
image: indexer | ||
command: | ||
- PGSSLMODE=no-verify yarnpkg migrate |