Implementation of Zero to Production In Rust: An introduction to backend development in Rust by Luca Palmieri
- Rust 98.3%
- Dockerfile 0.9%
- HTML 0.6%
- PLpgSQL 0.2%
| .cargo | ||
| .github/workflows | ||
| .sqlx | ||
| configuration | ||
| docs | ||
| migrations | ||
| src | ||
| tests/api | ||
| .dockerignore | ||
| .env | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| compose.yaml | ||
| deny.toml | ||
| DEVELOPMENT.md | ||
| Dockerfile | ||
| README.md | ||
| TODO.md | ||
Newsletter Email Service
A Rust-based newsletter email service with PostgreSQL backend and OpenTelemetry support.
Quick Start
-
Start PostgreSQL and Valkey, then run the database migrations:
docker compose up --detach --wait sqlx migrate run -
Run the application:
TEST_LOG=true RUST_LOG=debug cargo run | bunyan
Stop the local services without deleting PostgreSQL data:
docker compose down
To discard the local database as well, run docker compose down --volumes.
Features
- PostgreSQL database backend
- Valkey-backed session storage
- OpenTelemetry support via OpenObserve (optional)
- Comprehensive test coverage
- CI/CD pipeline with security audit
Documentation
- Development Guide - Detailed setup instructions and development guidelines
- CI/CD Pipeline - Information about our continuous integration and deployment process
Building for Production
Build a Docker image:
docker build --tag zero2prod --file Dockerfile .
License & Notes
- Haven't decided on license yet...
- This project was developed following the principles and practices taught in "Zero To Production In Rust" by Luca Palmieri.