This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
52 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,13 @@ | ||
* | ||
|
||
!pancaketrade/*.py | ||
!pancaketrade/conversations/*.py | ||
!pancaketrade/network/*.py | ||
!pancaketrade/persistence/*.py | ||
!pancaketrade/utils/*.py | ||
!pancaketrade/watchers/*.py | ||
!pancaketrade/abi | ||
!poetry.lock | ||
!poetry.toml | ||
!pyproject.toml | ||
!schema.yml |
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,38 @@ | ||
FROM python:3.9-buster AS build-deps | ||
|
||
WORKDIR /app | ||
|
||
ENV PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
# poetry will be installed here | ||
POETRY_HOME="/opt/poetry" \ | ||
POETRY_NO_INTERACTION=1 \ | ||
POETRY_NO_ANSI=1 | ||
# add poetry to path | ||
ENV PATH="$POETRY_HOME/bin:$PATH" | ||
|
||
# install poetry | ||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - | ||
|
||
COPY . ./ | ||
RUN poetry install --no-dev | ||
|
||
FROM python:3.9-slim-buster | ||
|
||
WORKDIR /app | ||
# the user needs to be able to write the database file to /app | ||
RUN chown 1000:1000 /app | ||
|
||
ENV PYTHONUNBUFFERED=1 \ | ||
VENV_PATH="/app/.venv" | ||
# add virtual environment binaries to path | ||
ENV PATH="$VENV_PATH/bin:$PATH" | ||
|
||
COPY --from=build-deps /app . | ||
|
||
USER 1000 | ||
|
||
ENTRYPOINT [ "trade" ] | ||
CMD [ "config.yml" ] |
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