chore: add crawler-google-alerts container; compose services (dev+default); CI build job
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
colin 2025-08-27 18:51:34 -04:00
parent 977e5b93ad
commit 26ef65438e
5 changed files with 64 additions and 0 deletions

View File

@ -1,3 +1,14 @@
pipeline:
build_app:
image: docker:24
commands:
- docker build -t ploughshares:ci -f docker/ploughshares/Dockerfile docker/ploughshares
build_crawler_google_alerts:
image: docker:24
commands:
- docker build -t ploughshares-crawler-google-alerts:ci docker/crawler-google-alerts
# build:0
labels:
location: manager

View File

@ -145,6 +145,14 @@ docker-compose up
The application will be available at http://localhost:5001.
### Crawler - Google Alerts
To run the Google Alerts crawler locally (requires GOOGLE_API_KEY):
```bash
GOOGLE_API_KEY=your_key docker-compose -f docker-compose.dev.yml run --rm crawler_google_alerts
```
## Features
- Transaction management (create, view, edit)

View File

@ -46,6 +46,19 @@ services:
timeout: 5s
retries: 5
crawler_google_alerts:
build:
context: ./docker/crawler-google-alerts
image: ploughshares-crawler-google-alerts:dev
environment:
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
depends_on:
db:
condition: service_started
command: python main.py
volumes:
- ./docker/crawler-google-alerts:/app
volumes:
postgres_dev_data:

View File

@ -38,6 +38,17 @@ services:
timeout: 5s
retries: 5
crawler_google_alerts:
build:
context: ./docker/crawler-google-alerts
image: ploughshares-crawler-google-alerts:latest
environment:
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
depends_on:
db:
condition: service_started
command: python main.py
volumes:
postgres_data:

View File

@ -0,0 +1,21 @@
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System deps (kept minimal; playwright browsers not installed unless needed at runtime)
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
COPY . /app
# GOOGLE_API_KEY must be provided at runtime
CMD ["python", "main.py"]