refactor: rename Wizamart to Orion across entire codebase
Replace all ~1,086 occurrences of Wizamart/wizamart/WIZAMART/WizaMart with Orion/orion/ORION across 184 files. This includes database identifiers, email addresses, domain references, R2 bucket names, DNS prefixes, encryption salt, Celery app name, config defaults, Docker configs, CI configs, documentation, seed data, and templates. Renames homepage-wizamart.html template to homepage-orion.html. Fixes duplicate file_pattern key in api.yaml architecture rule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# GitLab CI/CD Deployment Guide
|
||||
|
||||
This document describes how to deploy the Wizamart platform to a **DigitalOcean Droplet** using **bare-metal systemd + Nginx**, with automated deployments from **GitLab CI/CD**.
|
||||
This document describes how to deploy the Orion platform to a **DigitalOcean Droplet** using **bare-metal systemd + Nginx**, with automated deployments from **GitLab CI/CD**.
|
||||
|
||||
---
|
||||
|
||||
@@ -18,7 +18,7 @@ This document describes how to deploy the Wizamart platform to a **DigitalOcean
|
||||
The application will be deployed to:
|
||||
|
||||
```
|
||||
/var/www/wizamart/
|
||||
/var/www/orion/
|
||||
├── app/ # FastAPI application
|
||||
├── static/
|
||||
│ ├── admin/
|
||||
@@ -41,8 +41,8 @@ The application will be deployed to:
|
||||
```bash
|
||||
sudo adduser deploy --disabled-password
|
||||
sudo usermod -aG sudo deploy
|
||||
sudo mkdir -p /var/www/wizamart
|
||||
sudo chown -R deploy:deploy /var/www/wizamart
|
||||
sudo mkdir -p /var/www/orion
|
||||
sudo chown -R deploy:deploy /var/www/orion
|
||||
```
|
||||
|
||||
### Install System Dependencies
|
||||
@@ -68,9 +68,9 @@ source ~/.bashrc
|
||||
```bash
|
||||
# Create database and user
|
||||
sudo -u postgres psql << EOF
|
||||
CREATE USER wizamart WITH PASSWORD 'your_secure_password';
|
||||
CREATE DATABASE wizamart OWNER wizamart;
|
||||
GRANT ALL PRIVILEGES ON DATABASE wizamart TO wizamart;
|
||||
CREATE USER orion WITH PASSWORD 'your_secure_password';
|
||||
CREATE DATABASE orion OWNER orion;
|
||||
GRANT ALL PRIVILEGES ON DATABASE orion TO orion;
|
||||
EOF
|
||||
```
|
||||
|
||||
@@ -78,20 +78,20 @@ EOF
|
||||
|
||||
## 4. systemd Service
|
||||
|
||||
Create `/etc/systemd/system/wizamart.service`:
|
||||
Create `/etc/systemd/system/orion.service`:
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Wizamart FastAPI Application
|
||||
Description=Orion FastAPI Application
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
User=deploy
|
||||
Group=deploy
|
||||
WorkingDirectory=/var/www/wizamart
|
||||
Environment="PATH=/var/www/wizamart/.venv/bin"
|
||||
EnvironmentFile=/var/www/wizamart/.env
|
||||
ExecStart=/var/www/wizamart/.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8000 --workers 4
|
||||
WorkingDirectory=/var/www/orion
|
||||
Environment="PATH=/var/www/orion/.venv/bin"
|
||||
EnvironmentFile=/var/www/orion/.env
|
||||
ExecStart=/var/www/orion/.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8000 --workers 4
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
@@ -103,14 +103,14 @@ Enable the service:
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable wizamart
|
||||
sudo systemctl enable orion
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Nginx Configuration
|
||||
|
||||
Create `/etc/nginx/sites-available/wizamart`:
|
||||
Create `/etc/nginx/sites-available/orion`:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
@@ -119,14 +119,14 @@ server {
|
||||
|
||||
# Static files
|
||||
location /static/ {
|
||||
alias /var/www/wizamart/static/;
|
||||
alias /var/www/orion/static/;
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Media/uploads
|
||||
location /uploads/ {
|
||||
alias /var/www/wizamart/uploads/;
|
||||
alias /var/www/orion/uploads/;
|
||||
expires 7d;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ server {
|
||||
Enable the site:
|
||||
|
||||
```bash
|
||||
sudo ln -s /etc/nginx/sites-available/wizamart /etc/nginx/sites-enabled/
|
||||
sudo ln -s /etc/nginx/sites-available/orion /etc/nginx/sites-enabled/
|
||||
sudo rm /etc/nginx/sites-enabled/default # Remove default site
|
||||
sudo nginx -t
|
||||
sudo systemctl restart nginx
|
||||
@@ -249,10 +249,10 @@ deploy:
|
||||
"
|
||||
|
||||
# Restart the service
|
||||
- ssh $SERVER_USER@$SERVER_HOST "sudo systemctl restart wizamart"
|
||||
- ssh $SERVER_USER@$SERVER_HOST "sudo systemctl restart orion"
|
||||
|
||||
# Verify deployment
|
||||
- ssh $SERVER_USER@$SERVER_HOST "sudo systemctl status wizamart --no-pager"
|
||||
- ssh $SERVER_USER@$SERVER_HOST "sudo systemctl status orion --no-pager"
|
||||
only:
|
||||
- main
|
||||
environment:
|
||||
@@ -271,7 +271,7 @@ Configure these in **Settings > CI/CD > Variables**:
|
||||
| `SSH_PRIVATE_KEY` | Private key for server access | `-----BEGIN OPENSSH PRIVATE KEY-----...` |
|
||||
| `SERVER_USER` | SSH user on server | `deploy` |
|
||||
| `SERVER_HOST` | Server IP or hostname | `203.0.113.50` |
|
||||
| `SERVER_PATH` | Application directory | `/var/www/wizamart` |
|
||||
| `SERVER_PATH` | Application directory | `/var/www/orion` |
|
||||
|
||||
Mark `SSH_PRIVATE_KEY` as **Protected** and **Masked**.
|
||||
|
||||
@@ -279,7 +279,7 @@ Mark `SSH_PRIVATE_KEY` as **Protected** and **Masked**.
|
||||
|
||||
## 10. Environment Variables
|
||||
|
||||
Create `/var/www/wizamart/.env` on the server:
|
||||
Create `/var/www/orion/.env` on the server:
|
||||
|
||||
```bash
|
||||
# Application
|
||||
@@ -288,7 +288,7 @@ DEBUG=false
|
||||
SECRET_KEY=your-super-secret-key-change-this
|
||||
|
||||
# Database
|
||||
DATABASE_URL=postgresql://wizamart:password@localhost:5432/wizamart
|
||||
DATABASE_URL=postgresql://orion:password@localhost:5432/orion
|
||||
|
||||
# Stripe (if using billing)
|
||||
STRIPE_SECRET_KEY=sk_live_...
|
||||
@@ -308,7 +308,7 @@ LETZSHOP_API_URL=https://api.letzshop.lu
|
||||
Secure the file:
|
||||
|
||||
```bash
|
||||
chmod 600 /var/www/wizamart/.env
|
||||
chmod 600 /var/www/orion/.env
|
||||
```
|
||||
|
||||
---
|
||||
@@ -330,16 +330,16 @@ chmod 600 /var/www/wizamart/.env
|
||||
|
||||
```bash
|
||||
# View application logs
|
||||
sudo journalctl -u wizamart -f
|
||||
sudo journalctl -u orion -f
|
||||
|
||||
# Restart application
|
||||
sudo systemctl restart wizamart
|
||||
sudo systemctl restart orion
|
||||
|
||||
# Check application status
|
||||
sudo systemctl status wizamart
|
||||
sudo systemctl status orion
|
||||
|
||||
# Run migrations manually
|
||||
cd /var/www/wizamart
|
||||
cd /var/www/orion
|
||||
source .venv/bin/activate
|
||||
python -m alembic upgrade head
|
||||
|
||||
@@ -368,13 +368,13 @@ python -m alembic downgrade -1
|
||||
|
||||
```bash
|
||||
# Check logs
|
||||
sudo journalctl -u wizamart -n 100
|
||||
sudo journalctl -u orion -n 100
|
||||
|
||||
# Verify environment file
|
||||
cat /var/www/wizamart/.env
|
||||
cat /var/www/orion/.env
|
||||
|
||||
# Test manually
|
||||
cd /var/www/wizamart
|
||||
cd /var/www/orion
|
||||
source .venv/bin/activate
|
||||
uvicorn app.main:app --host 127.0.0.1 --port 8000
|
||||
```
|
||||
@@ -383,7 +383,7 @@ uvicorn app.main:app --host 127.0.0.1 --port 8000
|
||||
|
||||
```bash
|
||||
# Test PostgreSQL connection
|
||||
psql -U wizamart -h localhost -d wizamart
|
||||
psql -U orion -h localhost -d orion
|
||||
|
||||
# Check PostgreSQL status
|
||||
sudo systemctl status postgresql
|
||||
|
||||
Reference in New Issue
Block a user