Add Caddy server configuration for domain markov.elpatron.me with Let's Encrypt SSL and WebSocket support. Includes: - Caddy service in docker-compose.yml - Caddyfile with SSL and WebSocket configuration - Enhanced Flask app for proxy compatibility - Documentation files (CADDY.md, updated README.md)
This commit is contained in:
81
README.md
Normal file
81
README.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Capitalism Eats the World
|
||||
|
||||
A simulation-based web application that models economic systems using Markov chains to demonstrate how wealth distribution evolves over time.
|
||||
|
||||
## Overview
|
||||
|
||||
This project provides an interactive simulation of economic dynamics, particularly focusing on how wealth inequality can emerge and persist in market economies. The simulation uses Markov chain models to represent economic mobility and wealth accumulation patterns.
|
||||
|
||||
## Features
|
||||
|
||||
- Interactive web interface for running economic simulations
|
||||
- Real-time visualization of wealth distribution using Plotly and Matplotlib
|
||||
- RESTful API endpoints for programmatic access
|
||||
- WebSocket support for real-time updates during simulations
|
||||
- Docker containerization for easy deployment
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Docker and Docker Compose
|
||||
- A domain name (for production deployment with SSL)
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. Clone the repository:
|
||||
```bash
|
||||
git clone https://github.com/[user]/capitalism-eats-the-world.git
|
||||
cd capitalism-eats-the-world
|
||||
```
|
||||
|
||||
2. Build and run with Docker Compose:
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
3. Access the application at `http://localhost:5000`
|
||||
|
||||
## Production Deployment with Caddy and Let's Encrypt
|
||||
|
||||
For production deployment with automatic SSL certificates, the project includes a Caddy configuration:
|
||||
|
||||
1. Update the [Caddyfile](Caddyfile) with your email address for Let's Encrypt notifications
|
||||
2. Ensure your domain points to your server's IP address
|
||||
3. Run with Caddy:
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
The application will be available at `https://markov.elpatron.me` with automatic SSL certificate management.
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Docker Configuration](DOCKER.md) - Docker setup and deployment
|
||||
- [Caddy Configuration](CADDY.md) - Caddy server setup with Let's Encrypt
|
||||
- [Nginx Configuration](NGINX_CONFIG.md) - Alternative Nginx setup (if applicable)
|
||||
|
||||
## API Endpoints
|
||||
|
||||
- `GET /` - Main simulation interface
|
||||
- `POST /api/simulation` - Create a new simulation
|
||||
- `POST /api/simulation/<id>/start` - Start a simulation
|
||||
- `POST /api/simulation/<id>/stop` - Stop a simulation
|
||||
- `GET /api/simulation/<id>/data` - Get simulation data
|
||||
- `GET /api/simulations` - List all simulations
|
||||
|
||||
## WebSocket Events
|
||||
|
||||
- `simulation_progress` - Real-time updates during simulation
|
||||
- `simulation_complete` - Notification when simulation finishes
|
||||
- `simulation_error` - Error notifications
|
||||
|
||||
## Technology Stack
|
||||
|
||||
- Backend: Python, Flask, Flask-SocketIO
|
||||
- Frontend: HTML, CSS, JavaScript
|
||||
- Visualization: Plotly, Matplotlib
|
||||
- Containerization: Docker, Docker Compose
|
||||
- Reverse Proxy: Caddy (for SSL)
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](LICENSE)
|
Reference in New Issue
Block a user