เข้าถึง
- เปิด browser และไปที่:
https://<SERVER_IP>/_/admin - มีการใช้ใบรับรอง SSL ที่ลงนามด้วยตนเอง คาดว่าจะมีคำเตือนจากเบราว์เซอร์
- เข้าสู่ระบบโดยใช้ข้อมูลประจำตัวของผู้ดูแลระบบที่เก็บไว้บนเซิร์ฟเวอร์:
/root/.cloudzy-creds - หากต้องการดูข้อมูลรับรอง ให้รัน:
/root/.cloudzy-creds
ไฟล์และไดเรกทอรีที่สำคัญ
- ไบนารี่:
/usr/local/bin/trail - ไดเรกทอรีข้อมูล:
/var/lib/trailbase/traildepot - ไฟล์บริการ:
/etc/systemd/system/trailbase.service - การกำหนดค่าสภาพแวดล้อม:
/etc/default/trail - Nginx config:
/etc/nginx/sites-available/trailbase - ไซต์ที่เปิดใช้งาน:
/etc/nginx/sites-enabled/trailbase - SSL certificates:
/etc/nginx/ssl/fullchain.pem,/etc/nginx/ssl/privkey.pem - ข้อมูลรับรองผู้ดูแลระบบ:
/root/.cloudzy-creds
การใช้ Trail CLI
คำสั่งที่เป็นประโยชน์:
# Show all available commands
trail help
# Version
trail --version
# Start server (manual run)
trail run --help
trail --data-dir /var/lib/trailbase/traildepot run --address 127.0.0.1:4000
# Create user
trail --data-dir /var/lib/trailbase/traildepot user add <email> <password>
# Delete user
trail --data-dir /var/lib/trailbase/traildepot user delete <email>
# Change password
trail --data-dir /var/lib/trailbase/traildepot user change-password <email> <new-password>
# Change email
trail --data-dir /var/lib/trailbase/traildepot user change-email <old-email> <new-email>
# Admin commands
trail --data-dir /var/lib/trailbase/traildepot admin list
trail --data-dir /var/lib/trailbase/traildepot admin promote <email>
trail --data-dir /var/lib/trailbase/traildepot admin demote <email>
# Export OpenAPI definitions
trail openapi
# Components (WASM)
trail components list
หมายเหตุ
- ทำงานเป็นบริการ systemd
- ทำงานในฐานะผู้ใช้ที่ไม่ใช่รูท (
trailbase) - ผูกพันภายในกับ
127.0.0.1:4000และเปิดเผยผ่าน Nginx HTTPS - ใช้ SSL ที่ลงนามด้วยตนเอง
- คำสั่ง CLI บางคำสั่งจำเป็นต้องมีความชัดเจน
--data-dir - คุณสามารถหยุดอินสแตนซ์เริ่มต้นและเรียกใช้อินสแตนซ์ใหม่ได้หากจำเป็น:
systemctl stop trailbase - อัปเดต Nginx หากเส้นทาง/พอร์ตเปลี่ยนแปลง