A Dockerized event management system with a Spring Boot backend, React frontend, and PostgreSQL database.
- Docker
- Docker Compose
- Git
pingme/
├── docker-compose.yml
├── Dockerfile.backend
├── pingme-frontend/
│ ├── Dockerfile
│ └── src/
├── src/
│ └── main/
│ ├── java/
│ └── resources/
└── .env
Create a .env file in the root directory with the following variables:
# PostgreSQL
POSTGRES_USER=your_postgres_user
POSTGRES_PASSWORD=your_postgres_password
# Spring Boot
SPRING_DATASOURCE_USERNAME=your_db_user
SPRING_DATASOURCE_PASSWORD=your_db_password- Image:
postgres:13 - Port:
5432 - Database:
pingme - Data Persistence: Uses named volume
postgres_data
- Port:
8080 - Built from:
Dockerfile.backend - Environment: Connects to PostgreSQL database
- API Base URL:
http://localhost:8080
- Port:
3000 - Built from:
pingme-frontend/Dockerfile - Environment: Connects to backend service
- API Base URL:
http://localhost:3000
-
Clone the repository:
git clone <repository-url> cd pingme
-
Create
.envfile with required environment variables -
Build and start all services:
docker compose up -d
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
# Connect to PostgreSQL
docker compose exec postgres psql -U your_postgres_user -d pingme
# Backup database
docker compose exec postgres pg_dump -U your_postgres_user pingme > backup.sql
# Restore database
cat backup.sql | docker compose exec -T postgres psql -U your_postgres_user -d pingmeThe CI pipeline (ci.yml) is triggered on every push to master.
- Build & package application
- Unit tests (hard gate)
- Linting (Checkstyle – non-blocking)
- SAST using CodeQL
- SCA using Dependency Check
- Docker image build
- Container vulnerability scan (Trivy)
- Runtime smoke test
- Push trusted image to DockerHub
CI creates a trusted Docker image by enforcing quality and security checks.
The CD pipeline (cd.yml) is triggered manually.
- Provision Kubernetes cluster using Kind
- Deploy trusted Docker image
- Attempt rollout verification (non-blocking)
- Optional dummy DAST
CD deploys only trusted artifacts produced by CI.
- Go to
GitHub → Actions - Select PingMe CD Pipeline
- Click Run workflow
The following GitHub repository secrets must be configured:
| Secret Name | Purpose |
|---|---|
DOCKERHUB_USERNAME |
DockerHub username |
DOCKERHUB_TOKEN |
DockerHub access token |
Configured at:
GitHub → Settings → Secrets → Actions
Secrets are never hardcoded in code or workflows.
- Shift-left security through early SAST and SCA
- Defense-in-depth with container scanning
- Clear CI/CD separation
- Pipeline-as-code
- Demo-safe non-blocking gates for legacy constraints