-
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.
- Loading branch information
Showing
23 changed files
with
1,154 additions
and
427 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
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.DS_Store | ||
.idea | ||
.coverage | ||
config.yaml | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
|
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,26 @@ | ||
#--- BUILDER | ||
|
||
FROM python:3.10-alpine AS builder | ||
WORKDIR /app | ||
ADD pyproject.toml poetry.lock /app/ | ||
|
||
RUN apk add build-base libffi-dev libxml2-dev libxslt-dev | ||
RUN pip install poetry && \ | ||
poetry config virtualenvs.in-project true && \ | ||
poetry install --no-ansi | ||
|
||
#--- RUNNER | ||
|
||
FROM python:3.10-alpine | ||
WORKDIR /app | ||
|
||
COPY --from=builder /app /app | ||
ADD . /app | ||
|
||
RUN apk add libxml2-dev libxslt-dev | ||
|
||
RUN adduser app -h /app -u 1000 -g 1000 -DH | ||
USER 1000 | ||
|
||
CMD /app/.venv/bin/python -m selene | ||
#CMD /app/.venv/bin/python selene.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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
build: | ||
docker build -t selene . | ||
|
||
run: | ||
poetry run | ||
|
||
test: | ||
poetry run pytest | ||
poetry run pytest | ||
|
||
lint: | ||
find . -type f -name "*.py" | xargs pylint |
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
Oops, something went wrong.