Welcome to the DevOps technical challenge for Converty! This challenge is designed to simulate a real-world CI/CD pipeline with security and access controls using a simple React application.
You'll work with a minimal React application and build out Docker support, CI/CD pipelines, and branch protection. You'll also be expected to implement proper secret management and enforce a workflow where I (the reviewer) can only contribute via pull requests — without direct access to secrets or deployment controls.
- Fork this repository.
- Set your forked repo to private.
- Invite
AhmedAb1d(replace with actual GitHub username) as a collaborator.
- Create a
Dockerfilethat:- Builds the React app
- Serves it using
serveornginx
- Add a
.dockerignoreto clean up your Docker context. - ✅ Bonus: Optimize the image size — it should not exceed 60MB uncompressed (you may use multi-stage builds, minimal base images, etc.).
Create a workflow in .github/workflows/pr-check.yml that runs when pull requests are opened against main. It should:
- Install dependencies
- Run
npm run lint - Run
npm run test(include at least 1 dummy test) - Optionally: run
npm run build
Create another workflow in .github/workflows/docker-deploy.yml that:
- Runs on
pushormergetomain - Builds the Docker image
- Pushes it to your Docker Hub account
- Uses GitHub Actions secrets to store your Docker credentials
✅ Bonus: Add additional testing stages (e.g., integration tests, image vulnerability scans like Trivy, or checking if the container starts correctly using docker run).
Configure the following GitHub protections:
-
Enable branch protection for
main:- Require pull request reviews before merging
- Require status checks to pass
- Prevent force pushes and direct pushes
-
Ensure that:
- I cannot access or view your secrets
- I cannot push directly to
main - I can only open PRs from a branch
Once invited:
- I will create a branch and open a pull request.
- I will verify:
- CI workflow triggers and runs correctly
- Secrets are secure
- Main branch protection is enforced
- Docker image is pushed on merge to main
- Docker image size is within acceptable range (bonus)
- Additional test or validation stages exist (bonus)
- I will attempt to create another branch and modify the workflow on main to deploy a malicious Docker image to DockerHub (to test security controls).
- Optimize Docker image size (under 60MB uncompressed)
- Add Trivy or similar vulnerability scan
- Include end-to-end or smoke tests
- Add GitHub badges (build status, Docker push)
- Discuss potential scaling strategies or cost optimizations in README
- Document how to run and develop the app locally (see below)
This project is a Vite-based React app (with TypeScript).
# Install dependencies
npm install
# Run the development server
npm run dev
# Lint the code
npm run lint
# Run unit tests
npm test
# Build for production
npm run build