mnemo_cards/mnemo_cards_web_v2/deploy/README.md

73 lines
2 KiB
Markdown
Raw Permalink Normal View History

2025-11-19 17:37:43 +00:00
# 🚀 Deployment Configuration for mnemo_cards_web_v2
## 📁 Directory Structure
```
mnemo_cards_web_v2/
├── deploy.sh # Wrapper script (run this!)
└── deploy/
2025-11-19 22:41:54 +00:00
├── nginx.conf # Main domain nginx config (mnemo-cards.online)
2025-11-19 17:37:43 +00:00
├── vscode-nginx.conf # VSCode server nginx config
├── setup-vscode-domain.sh # VSCode domain setup script
└── README.md # This file
```
Centralized deployment scripts are located at:
```
tools/deploy/web-app/
├── config.sh # Deployment configuration
└── deploy.sh # Main deployment script
```
## 🎯 Usage
### Deploy Web App
From the project root directory:
```bash
cd mnemo_cards_web_v2
./deploy.sh
```
This wrapper script will:
1. Use centralized config from `tools/deploy/web-app/config.sh`
2. Build the Flutter web app locally with `-O4` optimization
2025-11-19 22:41:54 +00:00
3. Deploy to `mnemo-cards.online` using `deploy/nginx.conf`
2025-11-19 17:37:43 +00:00
### Setup VSCode Server (Optional)
```bash
cd deploy
./setup-vscode-domain.sh
```
## ⚙️ Configuration
All deployment settings are in `tools/deploy/web-app/config.sh`:
- Server IP: `147.45.152.129`
2025-11-19 22:41:54 +00:00
- Main domain: `mnemo-cards.online`
2025-11-19 20:10:22 +00:00
- API URL: `https://api.mnemo-cards.online` (nginx reverse proxy on port 443)
2025-11-19 17:37:43 +00:00
## 📝 Project-Specific Files
Files in `deploy/` directory are project-specific:
- `nginx.conf` - Main domain configuration
- `vscode-nginx.conf` - VSCode server configuration
- `setup-vscode-domain.sh` - VSCode setup automation
## 🔄 How It Works
1. **Local Build**: Flutter web app is built on your local machine
2. **Upload**: Built files are uploaded via `rsync`
3. **Server Setup**: Nginx, SSL, and firewall are configured automatically
## 🛡️ SSL Certificates
The deployment script tries Let's Encrypt first, then falls back to self-signed certificates.
## 📚 More Info
See `tools/deploy/web-app/README.md` for detailed documentation on centralized deployment scripts.