74 lines
2.5 KiB
Markdown
74 lines
2.5 KiB
Markdown
# nexus_infernum
|
|
|
|
Infernal Symphony of Agony: A Description of the Infrastructure Powering SpeedyWeedyOps Site
|
|
|
|
# SpeedyWeedyOps Web Infrastructure
|
|
|
|
This project sets up a web infrastructure using Docker Compose, including a Ghost blog, Gitea for Git repository hosting, and supporting services.
|
|
|
|
|
|
## Services
|
|
|
|
- **Caddy**: Web server and reverse proxy
|
|
- **Ghost**: Blogging platform
|
|
- **Gitea**: Self-hosted Git service
|
|
- **MySQL**: Database for both Ghost and Gitea
|
|
- **Varnish**: HTTP caching reverse proxy
|
|
|
|
## Architecture
|
|
|
|
![SpeedyWeedyOps Web Stack Architecture](./images/web-stack-scheme.svg)
|
|
|
|
The infrastructure is set up with the following architecture:
|
|
|
|
1. Caddy serves as the front-facing web server, handling HTTPS and acting as a reverse proxy.
|
|
2. Varnish sits between Caddy and Ghost, providing caching for improved performance.
|
|
3. Ghost and Gitea are the main applications, each exposed on different subdomains.
|
|
4. MySQL serves as the database backend for both Ghost and Gitea.
|
|
|
|
## Security Features
|
|
|
|
- HTTPS enforced by Caddy with automatic certificate management
|
|
- Security headers set in Caddy configuration
|
|
- Secrets management for sensitive data (e.g., database passwords)
|
|
- Network separation using Docker networks
|
|
|
|
## Performance Optimizations
|
|
|
|
- Varnish caching for Ghost content
|
|
- Static asset caching configured in Caddy
|
|
- Compression enabled for responses
|
|
|
|
## Configuration Files
|
|
|
|
- `compose.yml`: Defines the Docker services and their configurations
|
|
- `Caddyfile`: Caddy web server configuration
|
|
- `varnish/default.vcl`: Varnish caching rules
|
|
|
|
## Setup Instructions
|
|
|
|
1. Clone this repository
|
|
2. Create a `ghost_mysql_password` file with the desired MySQL password for Ghost
|
|
3. Adjust any configuration files as needed
|
|
4. Run `docker compose up -d` to start the services
|
|
|
|
## Maintenance
|
|
|
|
- Logs for all services are configured to output to stdout/stderr and can be viewed with `docker compose logs`
|
|
- Volume mounts are used for persistent data storage
|
|
- Regular backups of the MySQL data and application content are recommended
|
|
|
|
## Notes
|
|
|
|
- The www subdomain is configured to redirect to the non-www version
|
|
- The Ghost admin panel and API are excluded from Varnish caching
|
|
- Both Ghost and Gitea are configured to use MySQL as their database backend
|
|
|
|
For more detailed information about each service, refer to their respective documentation:
|
|
|
|
- [Caddy](https://caddyserver.com/docs/)
|
|
- [Ghost](https://ghost.org/docs/)
|
|
- [Gitea](https://docs.gitea.io/)
|
|
- [MySQL](https://dev.mysql.com/doc/)
|
|
- [Varnish](https://varnish-cache.org/docs/)
|