57 lines
1.3 KiB
Markdown
57 lines
1.3 KiB
Markdown
# Titan Deployment
|
|
|
|
Recommended paths on Titan:
|
|
|
|
```text
|
|
/root/repo/aishare
|
|
/root/compose/aishare
|
|
```
|
|
|
|
Clone/update the repo:
|
|
|
|
```bash
|
|
ssh titan-reverse
|
|
mkdir -p /root/repo /root/compose
|
|
git clone gitea:cabbage/aishare.git /root/repo/aishare
|
|
cp /root/repo/aishare/compose.yml /root/compose/aishare/compose.yml
|
|
cp /root/repo/aishare/.env.example /root/compose/aishare/.env
|
|
```
|
|
|
|
Edit `/root/compose/aishare/.env` and set `AISHARE_ADMIN_TOKEN`.
|
|
|
|
Start:
|
|
|
|
```bash
|
|
cd /root/compose/aishare
|
|
docker compose up --build -d
|
|
docker compose logs --tail=80 aishare
|
|
```
|
|
|
|
Add this location block to the existing `server_name xcel.me` server in `/root/compose/nginx/etc/nginx/sites-available/xcel.me.conf`, before `location /`:
|
|
|
|
```nginx
|
|
location = /aishare {
|
|
return 301 /aishare/;
|
|
}
|
|
|
|
location ^~ /aishare/ {
|
|
if ($https != on) {
|
|
return 307 https://$host$request_uri;
|
|
}
|
|
client_max_body_size 20m;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Real-Ip $remote_addr;
|
|
proxy_pass http://127.0.0.1:8088;
|
|
}
|
|
```
|
|
|
|
Reload nginx:
|
|
|
|
```bash
|
|
docker compose -f /root/compose/nginx/compose.yml exec nginx nginx -t
|
|
docker compose -f /root/compose/nginx/compose.yml exec nginx nginx -s reload
|
|
```
|