Replace .drone.yml with .woodpecker/ pipeline configs (frontend.yml, api.yml). Convert Drone env vars to Woodpecker equivalents (CI_PIPELINE_NUMBER, CI_COMMIT_SHA), use woodpeckerci/plugin-git for clone with retry, woodpeckerci/plugin-slack for notifications, and plugins/docker for image builds. Update all docs and skills.
3.1 KiB
3.1 KiB
| name | description | author | version | date |
|---|---|---|---|---|
| build-and-push | Build Docker images for the API and frontend, and push them to Docker Hub. Use when: (1) user wants to build new Docker images locally, (2) push images to the registry before deploying, (3) tag images for a release. Covers both the Python/FastAPI backend and the React/Nginx frontend. | Claude Code | 1.0.0 | 2026-02-06 |
Build and Push Docker Images
All commands run locally. Images are pushed to Docker Hub under the viktorbarzin namespace.
Image Registries
| Component | Docker Hub repo | Dockerfile location |
|---|---|---|
| API | viktorbarzin/realestatecrawler |
Dockerfile |
| Frontend | viktorbarzin/immoweb |
frontend/Dockerfile |
Building Images
Build API image
docker build -t viktorbarzin/realestatecrawler:latest .
Build Frontend image
docker build -t viktorbarzin/immoweb:latest frontend/
Build both
docker build -t viktorbarzin/realestatecrawler:latest . && \
docker build -t viktorbarzin/immoweb:latest frontend/
Build with a specific tag (recommended for production)
# Use git commit SHA
GIT_SHA=$(git rev-parse --short HEAD)
docker build -t viktorbarzin/realestatecrawler:${GIT_SHA} -t viktorbarzin/realestatecrawler:latest .
docker build -t viktorbarzin/immoweb:${GIT_SHA} -t viktorbarzin/immoweb:latest frontend/
Pushing Images
Login to Docker Hub (if not already)
docker login -u viktorbarzin
Push API image
docker push viktorbarzin/realestatecrawler:latest
Push Frontend image
docker push viktorbarzin/immoweb:latest
Push with specific tag
GIT_SHA=$(git rev-parse --short HEAD)
docker push viktorbarzin/realestatecrawler:${GIT_SHA}
docker push viktorbarzin/realestatecrawler:latest
docker push viktorbarzin/immoweb:${GIT_SHA}
docker push viktorbarzin/immoweb:latest
Build and Push Everything (Full Release)
GIT_SHA=$(git rev-parse --short HEAD)
# Build
docker build -t viktorbarzin/realestatecrawler:${GIT_SHA} -t viktorbarzin/realestatecrawler:latest .
docker build -t viktorbarzin/immoweb:${GIT_SHA} -t viktorbarzin/immoweb:latest frontend/
# Push
docker push viktorbarzin/realestatecrawler:${GIT_SHA}
docker push viktorbarzin/realestatecrawler:latest
docker push viktorbarzin/immoweb:${GIT_SHA}
docker push viktorbarzin/immoweb:latest
CI/CD Note
Woodpecker CI automatically builds and pushes images on push to master (see .woodpecker/).
The manual process above is for when you need to build/push outside of CI, such as:
- Hotfix deployments
- Testing image builds locally before pushing
- Deploying from a non-master branch
Notes
- The API Dockerfile installs system deps (OpenCV, Tesseract, MariaDB client) and Python deps via Poetry
- The Frontend Dockerfile is a multi-stage build: Node builder -> Nginx runtime
- Always tag with both
:latestand a specific tag (git SHA or version) for traceability - Use
docker buildxfor cross-platform builds if deploying to ARM nodes