กำลังเข้าถึง ToolJet
- เยี่ยมชม:
https://<SERVER-IP>/ - ยอมรับคำเตือน SSL (self-signed certificate)
- เมื่อเข้าใช้งานครั้งแรก ToolJet จะให้คุณสร้างบัญชีผู้ดูแลระบบเริ่มต้น
ไฟล์และไดเรกทอรีที่สำคัญ
- ไดเรกทอรีติดตั้งหลักของ ToolJet:
/root/tooljet - Environment variables (ฐานข้อมูล, secrets, การตั้งค่าแอป):
/root/tooljet/.env - การกำหนดค่า Docker Compose:
/root/tooljet/docker-compose.yaml - ข้อมูลถาวรของ PostgreSQL:
/root/tooljet/postgres_data - ใบรับรอง Nginx TLS (self-signed):
/etc/nginx/ssl/ - คอนฟิกของ Nginx site:
/etc/nginx/sites-available/tooljet
เปิดใช้งาน SSL กับโดเมน
1. ชี้โดเมนของคุณไปยัง IP ของ server
2. แก้ไขไฟล์ /root/tooljet/.env ไฟล์สำหรับตั้งค่าชื่อโดเมนของคุณ: TOOLJET_HOST=https://your.domain.com
3. สร้างบริการใหม่:
cd /root/tooljet/
docker compose up -d
4. แก้ไขการตั้งค่า Nginx และแทนที่ทั้งสอง server_name <IP>; กับโดเมนของคุณ (<your-domain>) สำหรับทั้ง HTTP (port 80) และ HTTPS (port 443) blocks:
vim /etc/nginx/sites-available/tooljet
๕. ติดตั้ง Certbot:
apt install -y certbot python3-certbot-nginx
6. รันคำสั่งต่อไปนี้เพื่อสร้างใบรับรอง Let’s Encrypt ที่ใช้งานได้:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
7. แทนที่ paths ของ SSL ใน Nginx config (ส่วน TLS):
vim /etc/nginx/sites-available/tooljet
# Before:
# ssl_certificate /etc/nginx/ssl/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
8. รีสตาร์ท Nginx เพื่อใช้การเปลี่ยนแปลง:
systemctl restart nginx
9. เปิด browser และไปที่: https://yourdomain.com