IR
ironicbadger/qr-code-generator
A minimal, distroless Docker container hosting a simple web UI for generating QR codes with SQLite persistence.
QR Code Generator
A minimal, distroless Docker container hosting a simple web UI for generating QR codes with SQLite persistence.
Features
- Generate QR codes from any text or URL
- History table with all generated QR codes
- Editable labels for organization
- Click to view/download full-size QR images
- Persistent storage via SQLite
- Tiny distroless container (~5MB)
Quick Start
# compose.yaml
services:
qr-code-generator:
image: ghcr.io/ironicbadger/qr-code-generator:latest
ports:
- "8080:8080"
volumes:
- qr-data:/data
volumes:
qr-data:# Using Docker Compose
docker compose up -d
# Or run directly
docker run -d -p 8080:8080 -v qr-data:/data ghcr.io/ironicbadger/qr-code-generator:latestAccess the web UI at http://localhost:8080
Development
Prerequisites
- Go 1.22+
- Docker
Local Development
# Run tests
go test -v ./...
# Build and run locally
go run ./cmd/server
# Build Docker image
docker build -t qr-code-generator .Project Structure
qr-code-generator/
├── cmd/server/ # Application entrypoint
│ ├── main.go
│ └── templates/ # HTML templates (embedded)
├── internal/
│ ├── handler/ # HTTP handlers
│ ├── qrcode/ # QR generation
│ └── storage/ # SQLite storage
├── .github/workflows/ # CI/CD
├── Dockerfile # Multi-stage distroless build
└── docker-compose.yml # Local development
API Endpoints
| Method | Path | Description |
|---|---|---|
| GET | / |
Main page with form and history |
| POST | /generate |
Generate new QR code |
| GET | /qr/{id} |
Get QR code image |
| PUT | /qr/{id} |
Update QR code label |
| DELETE | /qr/{id} |
Delete QR code |
| GET | /health |
Health check |
Environment Variables
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Server port |
DB_PATH |
/data/qrcodes.db |
SQLite database path |
License
MIT
On this page
Languages
Go71.3%HTML26.5%Dockerfile2.3%
Contributors
MIT License
Created December 30, 2025
Updated January 3, 2026