This project is a ready-to-use fullstack template that leverages Docker Compose to seamlessly integrate Nginx, React, FastAPI, and MariaDB. It provides a modern, production-like environment for rapid development and deployment of web applications with a clear separation between frontend and backend services.
- ⚛️ Frontend: Built with React, offering a fast and modern user interface.
- 🚀 Backend: Powered by FastAPI, providing a robust and flexible API layer.
- 🛢️ Database: Uses MariaDB for reliable and high-performance data storage.
- 🗄️ Database Management: phpMyAdmin provides an intuitive web-based interface for managing MariaDB databases.
- 🔀 Reverse Proxy: Nginx serves as a reverse proxy, efficiently routing traffic to the appropriate services.
- 📊 Log Management: Grafana provides log visualization and monitoring dashboards.
- 🐳 Dockerized: All services are containerized with Docker Compose for easy deployment.
- ⚙️ CI/CD Testing: Automated testing and generate coverage reporting with GitHub Actions.
git clone https://github.com/Lcwei-0708/docker-fullstack-template.gitcd docker-fullstack-templateIf you want to customize settings, copy .env.example to .env and edit as needed.
Set the
COMPOSE_FILEenvironment variable to switch between development and production modes.
If you need to restrict the range of allowed IP addresses, edit this file.
- To enable SSL (HTTPS), you need to configure SSL settings in your
.envfile and place your SSL certificates in thenginx/ssldirectory.-
Env setting:
SSL_ENABLE=true SSL_CERT_FILE=cert.pem SSL_KEY_FILE=privkey.pem
-
Place your certificates in the
nginx/ssldirectory:nginx/ssl/ ├── cert.pem # Your SSL certificate └── privkey.pem # Your private key
-
See Nginx Docs for more details.
First run or after code changes:
docker compose up -d --buildSubsequent runs (no code changes):
docker compose up -ddocker compose down| Directory | Link |
|---|---|
| Frontend | Docs |
| Backend | Docs |
| Nginx | Docs |
| CICD | Docs |
This project is licensed under the MIT License.