This project is a Python API that reads and writes to a database, fully automated on a Linux server, using Bash scripts for operations tasks and CI/CD for deployment.
- Linux (Ubuntu Server)
- Bash (automation & deployment)
- Python (Flask or FastAPI)
- PostgreSQL (or MySQL)
- Docker
- GitHub Actions
- Nginx
- Systemd
- AWS EC2 (or any VPS)
User
↓
Nginx (Linux)
↓
Python API (Docker)
↓
PostgreSQL
- REST API (CRUD)
- /health endpoint
- Reads & writes to DB
- Uses env vars (12-factor style)
deploy.sh– pull image & restart servicebackup_db.sh– scheduled DB backupshealth_check.sh– service monitoringlog_rotate.sh– clean old logssetup_server.sh– one-command server bootstrap
- Run Python tests
- Lint code
- Build Docker image
- Push image to registry
- SSH into Linux server
- Run Bash deploy script
- systemd service for API
- Nginx as reverse proxy
- UFW firewall
- Non-root user
- SSH key auth only