Align branding, prompts, and deployment tooling

This commit is contained in:
2026-03-28 22:16:56 +08:00
parent 4aa69650e8
commit 4295293a21
90 changed files with 1320 additions and 2044 deletions

View File

@@ -1,24 +1,25 @@
# Deployment Notes
This directory contains the current production-oriented deployment artifacts for
the EvoTraders frontend site and the live gateway process.
the 大时代 frontend site and the live gateway process.
## Contents
- [deploy/systemd/evotraders.service](./systemd/evotraders.service)
- systemd unit for the long-running EvoTraders gateway process
- systemd unit for the long-running 大时代 gateway process
- [scripts/run_prod.sh](../scripts/run_prod.sh)
- production launch script used by the systemd unit
- [deploy/nginx/evotraders.cillinn.com.conf](./nginx/evotraders.cillinn.com.conf)
- [deploy/nginx/bigtime.cillinn.com.conf](./nginx/bigtime.cillinn.com.conf)
- HTTPS nginx config with WebSocket proxying
- [deploy/nginx/evotraders.cillinn.com.http.conf](./nginx/evotraders.cillinn.com.http.conf)
- [deploy/nginx/bigtime.cillinn.com.http.conf](./nginx/bigtime.cillinn.com.http.conf)
- plain HTTP/static-site variant
## Current Production Shape
The checked-in production path is intentionally minimal:
- nginx serves the built frontend from `/var/www/evotraders/current`
- nginx serves the built frontend from `/var/www/bigtime/current`
- public domain examples use `bigtime.cillinn.com`
- nginx proxies `/ws` to `127.0.0.1:8765`
- systemd runs `scripts/run_prod.sh`
- `scripts/run_prod.sh` starts `python3 -m backend.main` in live mode on `127.0.0.1:8765`
@@ -28,7 +29,7 @@ frontend, not on exposing the split FastAPI services directly.
## Important Paths And Ports
- frontend root: `/var/www/evotraders/current`
- frontend root: `/var/www/bigtime/current`
- gateway bind: `127.0.0.1:8765`
- public WebSocket path: `/ws`
- working directory expected by systemd: `/root/code/evotraders`
@@ -61,32 +62,45 @@ journalctl -u evotraders -f
The HTTPS nginx config does two things:
- redirects `http://evotraders.cillinn.com` to HTTPS
- redirects `http://bigtime.cillinn.com` to HTTPS
- proxies `/ws` to the local gateway process with WebSocket upgrade headers
Typical install flow:
```bash
sudo cp deploy/nginx/evotraders.cillinn.com.conf /etc/nginx/sites-available/evotraders.cillinn.com.conf
sudo ln -s /etc/nginx/sites-available/evotraders.cillinn.com.conf /etc/nginx/sites-enabled/
sudo cp deploy/nginx/bigtime.cillinn.com.conf /etc/nginx/sites-available/bigtime.cillinn.com.conf
sudo ln -s /etc/nginx/sites-available/bigtime.cillinn.com.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
```
The checked-in TLS config expects Let's Encrypt assets at:
- `/etc/letsencrypt/live/evotraders.cillinn.com/fullchain.pem`
- `/etc/letsencrypt/live/evotraders.cillinn.com/privkey.pem`
- `/etc/letsencrypt/live/bigtime.cillinn.com/fullchain.pem`
- `/etc/letsencrypt/live/bigtime.cillinn.com/privkey.pem`
## Environment Expectations
Before using the production scripts, ensure the runtime environment has:
- a usable Python environment
- backend dependencies installed from `requirements.txt`
- the package installed with `pip install -e .` or `uv pip install -e .`
- frontend dependencies installed with `npm ci`
- repo dependencies installed
- required market/model API keys
- any desired `TICKERS` override
Recommended production install sequence:
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
cd frontend && npm ci && npm run build && cd ..
```
The production script currently sets:
```bash

View File

@@ -1,9 +1,9 @@
server {
listen 80;
server_name evotraders.cillinn.com;
server_name bigtime.cillinn.com;
location /.well-known/acme-challenge/ {
root /var/www/evotraders/current;
root /var/www/bigtime/current;
allow all;
}
@@ -14,13 +14,13 @@ server {
server {
listen 443 ssl http2;
server_name evotraders.cillinn.com;
server_name bigtime.cillinn.com;
root /var/www/evotraders/current;
root /var/www/bigtime/current;
index index.html;
ssl_certificate /etc/letsencrypt/live/evotraders.cillinn.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/evotraders.cillinn.com/privkey.pem;
ssl_certificate /etc/letsencrypt/live/bigtime.cillinn.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/bigtime.cillinn.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

View File

@@ -1,8 +1,8 @@
server {
listen 80;
server_name evotraders.cillinn.com;
server_name bigtime.cillinn.com;
root /var/www/evotraders/current;
root /var/www/bigtime/current;
index index.html;
location /.well-known/acme-challenge/ {

View File

@@ -1,5 +1,5 @@
[Unit]
Description=EvoTraders Production Service
Description=大时代 Production Service
After=network.target
[Service]