Files
aishare/docs/deploy-titan.md
T

58 lines
1.2 KiB
Markdown

# Titan Deployment
Recommended path on Titan:
```text
/root/compose/aishare
```
Clone/update the repo:
```bash
ssh titan-reverse
mkdir -p /root/compose
git clone https://git.xcel.me/cabbage/aishare.git /root/compose/aishare
cd /root/compose/aishare
cp .env.example .env
```
Edit `/root/compose/aishare/.env` and set `AISHARE_ADMIN_TOKEN`.
Start:
```bash
cd /root/compose/aishare
mkdir -p data
chown -R 1001:1001 data
docker-compose -f compose.yml up --build -d
docker-compose -f compose.yml 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
nginx -t
docker exec nginx nginx -s reload
```