make projekt as docker
This commit is contained in:
parent
cafa2f7e9b
commit
a8344734b3
6 changed files with 71 additions and 1 deletions
12
.dockerignore
Normal file
12
.dockerignore
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.log
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
debug-run.json
|
||||||
|
downloads/
|
||||||
|
state/
|
||||||
|
.vscode/
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -10,6 +10,8 @@ venv/
|
||||||
# Local debug and runtime artifacts
|
# Local debug and runtime artifacts
|
||||||
debug-run.json
|
debug-run.json
|
||||||
*.log
|
*.log
|
||||||
|
state/
|
||||||
|
downloads/
|
||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
.vscode/*.code-workspace
|
.vscode/*.code-workspace
|
||||||
|
|
|
||||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
FROM mcr.microsoft.com/playwright/python:v1.52.0-jammy
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY requirements.txt /app/requirements.txt
|
||||||
|
RUN pip install --no-cache-dir -r /app/requirements.txt
|
||||||
|
|
||||||
|
COPY main.py /app/main.py
|
||||||
|
COPY README.md /app/README.md
|
||||||
|
|
||||||
|
ENTRYPOINT ["python", "/app/main.py"]
|
||||||
|
CMD ["-h"]
|
||||||
31
README.md
31
README.md
|
|
@ -36,6 +36,37 @@ Die Session wird lokal gespeichert in:
|
||||||
python main.py download --from 2025-01-01 --to 2025-12-31
|
python main.py download --from 2025-01-01 --to 2025-12-31
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Docker Compose
|
||||||
|
|
||||||
|
Container-Image bauen:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
cd c:\projekte\amazon_invoice_downloader
|
||||||
|
docker compose build
|
||||||
|
```
|
||||||
|
|
||||||
|
Rechnungen im Container herunterladen:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
docker compose run --rm amazon-invoice-downloader download --from 2025-01-01 --to 2025-12-31 --headless true
|
||||||
|
```
|
||||||
|
|
||||||
|
Persistente Ordner:
|
||||||
|
|
||||||
|
- `./state` -> `/root/.amazon_invoice_downloader` (config + session)
|
||||||
|
- `./downloads` -> `/downloads` (Ausgabedateien)
|
||||||
|
|
||||||
|
Falls du bereits lokal konfiguriert hast, kopiere diese Dateien nach `./state`:
|
||||||
|
|
||||||
|
- `config.json`
|
||||||
|
- `storage_state.json`
|
||||||
|
|
||||||
|
Optionaler Zielordner im Container:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
docker compose run --rm amazon-invoice-downloader download --from 2025-01-01 --to 2025-12-31 --output /downloads --headless true
|
||||||
|
```
|
||||||
|
|
||||||
Optionen:
|
Optionen:
|
||||||
|
|
||||||
- `--output <pfad>`: anderes Zielverzeichnis
|
- `--output <pfad>`: anderes Zielverzeichnis
|
||||||
|
|
|
||||||
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
services:
|
||||||
|
amazon-invoice-downloader:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: amazon-invoice-downloader:latest
|
||||||
|
container_name: amazon-invoice-downloader
|
||||||
|
working_dir: /app
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./downloads:/downloads
|
||||||
|
- ./state:/root/.amazon_invoice_downloader
|
||||||
|
command: ["-h"]
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
playwright>=1.52.0
|
playwright>=1.52.0
|
||||||
requests>=2.32.0
|
|
||||||
dateparser>=1.2.0
|
dateparser>=1.2.0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue