-
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
49 changed files
with
4,117 additions
and
1,802 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
**/.git/ | ||
**/.github/ | ||
**/.ruff_cache/ | ||
**/__pycache__/ | ||
**/pyproject.toml | ||
**/poetry.lock | ||
**/requirements-dev.txt | ||
**/config.yaml |
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,22 @@ | ||
name: Static Check | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
static-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
cache: "poetry" | ||
- name: Install Dependencies | ||
run: poetry install --all-extras | ||
- name: Lint With Ruff | ||
run: poetry run ruff check --output-format=github . | ||
- name: Type checking with Pyright | ||
run: poetry run pyright --warnings . |
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,3 +1,2 @@ | ||
__pycache__/ | ||
.mypy_cache/ | ||
**/__pycache__ | ||
config.yaml |
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,18 +1,16 @@ | ||
FROM python:3.10.8-slim | ||
|
||
WORKDIR /app | ||
|
||
ENV TZ Asia/Shanghai | ||
|
||
COPY requirements.txt . | ||
|
||
RUN pip install \ | ||
-r requirements.txt \ | ||
--no-cache-dir \ | ||
--no-compile \ | ||
--disable-pip-version-check \ | ||
--quiet | ||
|
||
COPY . . | ||
|
||
CMD ["python", "main.py"] | ||
FROM python:3.10-slim | ||
|
||
ENV TZ Asia/Shanghai | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt . | ||
RUN pip install \ | ||
-r requirements.txt \ | ||
--no-cache-dir \ | ||
--no-compile \ | ||
--disable-pip-version-check | ||
|
||
COPY . . | ||
|
||
CMD ["python", "main.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
# JFetcher |
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,12 @@ | ||
version: v3.0.0 | ||
mongodb: | ||
host: localhost | ||
port: 27017 | ||
database: jfetcher | ||
log: | ||
save_level: DEBUG | ||
print_level: DEBUG | ||
feishu_notification: | ||
enabled: false | ||
webhook_url: <webhook-url> | ||
failure_card_id: <card-id> |
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 |
---|---|---|
@@ -1,26 +1,27 @@ | ||
version: "3" | ||
|
||
networks: | ||
mongodb: | ||
external: true | ||
|
||
services: | ||
main: | ||
image: jfetcher:2.7.4 | ||
build: . | ||
volumes: | ||
- "./config.yaml:/app/config.yaml:ro" | ||
networks: | ||
- mongodb | ||
environment: | ||
- PYTHONUNBUFFERED=1 | ||
deploy: | ||
resources: | ||
limits: | ||
cpus: "0.30" | ||
memory: 96M | ||
restart_policy: | ||
condition: on-failure | ||
delay: 5s | ||
max_attempts: 3 | ||
stop_grace_period: 1s | ||
networks: | ||
mongodb: | ||
external: true | ||
prefect: | ||
external: true | ||
|
||
services: | ||
main: | ||
image: jfetcher:3.0.0 | ||
container_name: jfetcher-v3 | ||
build: . | ||
volumes: | ||
- ./config.yaml:/app/config.yaml:ro | ||
networks: | ||
- mongodb | ||
- prefect | ||
environment: | ||
- PYTHONUNBUFFERED=1 | ||
- PREFECT_API_URL=http://prefect:4200/api | ||
deploy: | ||
resources: | ||
limits: | ||
memory: 512M | ||
restart_policy: | ||
condition: on-failure | ||
delay: 5s | ||
max_attempts: 3 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.