-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fallback to requirements.txt, given poetry limit
python-poetry/poetry#5172 wait for merge
- Loading branch information
Showing
5 changed files
with
8 additions
and
130 deletions.
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 |
---|---|---|
@@ -1,21 +1,9 @@ | ||
# dev image | ||
FROM python:3.8-slim as dev | ||
FROM python:3.10-slim | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
WORKDIR /usr/src/app | ||
|
||
COPY poetry.lock pyproject.toml ./ | ||
RUN pip install poetry \ | ||
&& poetry config virtualenvs.create false | ||
RUN poetry install --no-interaction --no-ansi \ | ||
&& poetry export -f requirements.txt --output requirements.txt | ||
|
||
FROM python:3.8-slim AS prod | ||
WORKDIR /usr/src/app | ||
# copy and install dependencies | ||
COPY --from=dev /usr/src/app/requirements.txt ./ | ||
COPY requirements.txt update_locations.py ./ | ||
RUN pip install -r requirements.txt | ||
# copy app sources | ||
COPY ./*.py ./ | ||
COPY scilog scilog | ||
|
||
CMD ["python", "update_locations.py"] |
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ services: | |
app: | ||
build: | ||
context: . | ||
target: dev | ||
volumes: | ||
- .:/usr/src/app | ||
- .env:/usr/src/app/.env | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
certifi==2022.6.15 | ||
charset-normalizer==2.1.0 | ||
idna==3.3 | ||
python-dotenv==0.20.0 | ||
requests==2.28.1 | ||
urllib3==1.26.11 |