Skip to content

Commit 2dac897

Browse files
karthiknittclaude
andauthored
Add Docker Hub and GHCR pre-built image information to README (#27)
* Add automated Docker image publishing to Docker Hub and GHCR Enhanced the Docker build workflow to automatically build and push images to both Docker Hub and GitHub Container Registry on pushes to main branch. Changes: - Added Docker Hub and GHCR authentication steps - Configured multi-registry image tagging (latest, branch, SHA) - Updated health and API endpoint tests to use published images - Added required permissions for GHCR package publishing Required secrets: DOCKERHUB_USERNAME, DOCKERHUB_TOKEN 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add Docker Hub and GHCR pre-built image information to README Updated the README.md to inform users that pre-built Docker images are available for easy deployment. Changes: - Added "Pre-built Docker Images" section in Deployment Options - Included Docker Hub pull command: karthiknitt/tamil-panchang-api:latest - Included GHCR pull command: ghcr.io/karthiknitt/tamil-panchang-api:latest - Added quick run example using Docker Hub image - Fixed markdown linting issues (blank lines around code blocks) Users can now quickly deploy the API without building from source. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 12ed4e5 commit 2dac897

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,34 @@ The API returns a comprehensive JSON response with all panchang data:
360360

361361
## 🛠️ Deployment Options
362362

363+
### Pre-built Docker Images
364+
365+
This repository is available as pre-built Docker images on Docker Hub and GitHub Container Registry:
366+
367+
**Docker Hub (Recommended):**
368+
369+
```bash
370+
docker pull karthiknitt/tamil-panchang-api:latest
371+
```
372+
373+
**GitHub Container Registry:**
374+
375+
```bash
376+
docker pull ghcr.io/karthiknitt/tamil-panchang-api:latest
377+
```
378+
379+
**Quick Run:**
380+
381+
```bash
382+
# Run with Docker Hub image
383+
docker run -d -p 8000:8000 -p 8001:8001 karthiknitt/tamil-panchang-api:latest
384+
385+
# Test the API
386+
curl http://localhost:8000/health
387+
```
388+
389+
The images are automatically built and published on every push to the main branch via GitHub Actions.
390+
363391
### Option 1: Standalone (Local Development/Testing)
364392

365393
**Best for:** Local development, testing, or simple deployments without reverse proxy
@@ -439,6 +467,54 @@ environment:
439467

440468
**Note:** Swiss Ephemeris data files are automatically downloaded during Docker build.
441469

470+
### CI/CD Pipeline
471+
472+
This repository includes automated Docker image building and publishing via GitHub Actions.
473+
474+
#### Automated Deployment
475+
476+
The CI/CD pipeline automatically:
477+
478+
1. **Triggers** on pushes to the `main` branch
479+
2. **Builds** the Docker image using the optimized Dockerfile
480+
3. **Pushes** to both Docker Hub and GitHub Container Registry (GHCR)
481+
4. **Tests** the deployed image to ensure functionality
482+
483+
#### Required Secrets
484+
485+
To enable automated publishing, configure these repository secrets in GitHub:
486+
487+
| Secret Name | Description | Where to Get It |
488+
|-------------|-------------|-----------------|
489+
| `DOCKERHUB_USERNAME` | Your Docker Hub username | Docker Hub account settings |
490+
| `DOCKERHUB_TOKEN` | Docker Hub access token | Docker Hub → Account Settings → Security → Access Tokens |
491+
492+
**Setting up Docker Hub Token:**
493+
494+
1. Go to [Docker Hub](https://hub.docker.com/)
495+
2. Login and go to Account Settings → Security
496+
3. Generate a new Access Token
497+
4. Copy the token and add it as `DOCKERHUB_TOKEN` in repository secrets
498+
499+
**Note:** GHCR publishing uses the built-in `GITHUB_TOKEN` which is automatically provided by GitHub Actions. You do **not** need to create or configure this token - it's available by default in all workflows.
500+
501+
#### Image Names
502+
503+
Images are published with these names:
504+
505+
- **Docker Hub:** `yourusername/tamil-panchang-api`
506+
- **GHCR:** `ghcr.io/yourusername/tamil-panchang-api`
507+
508+
Replace `yourusername` with your actual GitHub/Docker Hub username.
509+
510+
#### Tags
511+
512+
The following tags are automatically applied:
513+
514+
- `latest` - Latest build from main branch
515+
- `main` - Current main branch commit
516+
- `main-<sha>` - Specific commit SHA (first 7 characters)
517+
442518
## 📜 Fair Use Policy
443519

444520
This API is free for everyone:

0 commit comments

Comments
 (0)