This project is a full stack (React + Node.js) application, containerized and available via:
- ✅ CI/CD via GitHub Actions
- ✅ Deployment to your own VPS via SSH
- ✅ Frontend and Backend both accessible via your own domain name
/frontend → React frontend (Dockerized with Nginx)
/backend → Express.js API backend
/.github → GitHub Actions CI/CD workflow
docker-compose.yml → Orchestrates frontend, backend and Traefik
Service | URL | Description |
---|---|---|
Frontend | https://www.yourdomain.com |
React app served via Traefik |
Backend | https://api.yourdomain.com |
Express API served via Traefik |
- Make sure your domain uses Cloudflare DNS
- Create a
.env
file in the root with your Cloudflare credentials:
CF_API_EMAIL=[email protected]
CF_API_KEY=your_cloudflare_api_key
- Optionally, fill in the
.env.example
files infrontend/
andbackend/
docker-compose up -d
Add the following secrets to your GitHub repository:
Secret | Description |
---|---|
VPS_HOST |
Your server IP or hostname |
VPS_USER |
Your remote user on the VPS |
VPS_SSH_KEY |
Your private SSH key (no passphrase) |
Each push to the master
branch will trigger an auto-deploy.
To manually build and push Docker images:
chmod +x build_and_push.sh
./build_and_push.sh
Make sure you're logged in to Docker Hub first:
docker login
MIT © Siam Smeets