This commit is contained in:
Your Name committed 2026-07-15 18:37:16 -04:00
1 parent 938cee871d
commit 913cbef765
7 files changed
+49 -49

No files matched your search

+23 -23
View File
@@ -5,14 +5,14 @@
## Target
- Project name: `ddc`
- Website: `https://ddc.kitizone.com`
- SPA: `https://spa.ddc.kitizone.com`
- Admin: `https://admin.ddc.kitizone.com`
- API: `https://api.ddc.kitizone.com`
- Website: `https://ddc.kittisak.com`
- SPA: `https://spa.ddc.kittisak.com`
- Admin: `https://admin.ddc.kittisak.com`
- API: `https://api.ddc.kittisak.com`
- Database: `ddcdb`
- Website SSR port: `3004`
- Backend API port: `3053`
- Bare repo: `/home/ti/git/ddc.git`
- Bare repo: `/home/ti/git/ddc-website.git`
- Backend path: `/home/ti/projects/ddc-api`
- Website path: `/home/ti/projects/ddc-website`
- SPA static path: `/home/ti/projects/MyNginxMain/nginx/html/ddc/spa`
@@ -22,10 +22,10 @@
- `serverinfo/ddc-post-receive`
- `serverinfo/ddc-backend.env.example`
- `serverinfo/ddc-nginx/ddc.kitizone.com.conf`
- `serverinfo/ddc-nginx/spa.ddc.kitizone.com.conf`
- `serverinfo/ddc-nginx/admin.ddc.kitizone.com.conf`
- `serverinfo/ddc-nginx/api.ddc.kitizone.com.conf`
- `serverinfo/ddc-nginx/ddc.kittisak.com.conf`
- `serverinfo/ddc-nginx/spa.ddc.kittisak.com.conf`
- `serverinfo/ddc-nginx/admin.ddc.kittisak.com.conf`
- `serverinfo/ddc-nginx/api.ddc.kittisak.com.conf`
## Preflight On Server
@@ -41,8 +41,8 @@ If ports `3004` or `3053` are already used, stop and choose new ports before app
## 1. Create Bare Git Repository
```bash
mkdir -p /home/ti/git/ddc.git
cd /home/ti/git/ddc.git
mkdir -p /home/ti/git/ddc-website.git
cd /home/ti/git/ddc-website.git
git init --bare
```
@@ -78,10 +78,10 @@ cd /home/ti/projects/MyNginxMain
docker compose stop nginx
docker compose run --rm certbot certonly --standalone \
-d ddc.kitizone.com \
-d spa.ddc.kitizone.com \
-d admin.ddc.kitizone.com \
-d api.ddc.kitizone.com
-d ddc.kittisak.com \
-d spa.ddc.kittisak.com \
-d admin.ddc.kittisak.com \
-d api.ddc.kittisak.com
```
## 6. Install Nginx Configs
@@ -127,20 +127,20 @@ serverinfo/ddc-post-receive
To:
```text
/home/ti/git/ddc.git/hooks/post-receive
/home/ti/git/ddc-website.git/hooks/post-receive
```
Then run:
```bash
chmod +x /home/ti/git/ddc.git/hooks/post-receive
chmod +x /home/ti/git/ddc-website.git/hooks/post-receive
```
## 9. Deploy From Developer Machine
```bash
git remote add ddc ti@kitizone.com:/home/ti/git/ddc.git
git push ddc master
git remote add ddc-website ti@kitizone.com:/home/ti/git/ddc-website.git
git push ddc-website master
```
## 10. Seed Database
@@ -160,10 +160,10 @@ Default seeded admin account is currently `admin / homaroma123`. Change it befor
```bash
pm2 list
curl -I https://ddc.kitizone.com
curl -I https://spa.ddc.kitizone.com
curl -I https://admin.ddc.kitizone.com
curl -I https://api.ddc.kitizone.com
curl -I https://ddc.kittisak.com
curl -I https://spa.ddc.kittisak.com
curl -I https://admin.ddc.kittisak.com
curl -I https://api.ddc.kittisak.com
```
Expected PM2 processes: