เข้าใช้งานแอปพลิเคชัน
เปิดเบราว์เซอร์แล้วไปที่: http://<SERVER_IP>
การเริ่มต้นครั้งแรกอาจใช้เวลาสองสามนาที หากพบ Nginx 502 ในช่วงนี้ถือเป็นเรื่องปกติ
ข้อมูลเข้าสู่ระบบเริ่มต้น:
- อีเมล:
[email protected] - รหัสผ่าน:
sample
อย่าลืมเปลี่ยนอีเมลและรหัสผ่านของคุณในหน้าการตั้งค่า
เส้นทางที่สำคัญ
- ไดเรกทอรี่การติดตั้ง:
/opt/automatisch - โฟลเดอร์โครงการ:
/opt/automatisch - ไฟล์ Docker Compose:
/opt/automatisch/docker-compose.yml - พื้นที่จัดเก็บข้อมูลแอปพลิเคชัน (volume):
/var/lib/docker/volumes/automatisch_automatisch_storage/_data - ข้อมูล PostgreSQL (volume):
/var/lib/docker/volumes/automatisch_postgres_data/_data - ข้อมูล Redis (volume):
/var/lib/docker/volumes/automatisch_redis_data/_data - NGINX การตั้งค่า:
/etc/nginx/sites-available/automatisch - เว็บไซต์ที่เปิดใช้งาน NGINX:
/etc/nginx/sites-enabled/automatisch
คำสั่งทั่วไป
ไปยังโปรเจกต์:
cd /opt/automatisch
ดูบันทึก:
docker compose logs -f
รีสตาร์ทบริการ:
docker compose restart
หยุด / เริ่มต้น:
docker compose down
docker compose up -d
ตรวจสอบคอนเทนเนอร์
docker ps
บริการ
- Main: เว็บแอปพลิเคชัน Automatisch เปิดใช้งานที่พอร์ต 3000
- Worker: ตัวประมวลผลงานเบื้องหลัง ใช้งานภายใน
- PostgreSQL: บริการฐานข้อมูล ใช้งานภายใน (พอร์ตเริ่มต้น 5432)
- Redis: บริการ queue และ cache ใช้งานภายใน (พอร์ตเริ่มต้น 6379)
เปิดใช้งาน SSL พร้อมโดเมน
1. ชี้โดเมนของคุณไปที่ IP ของเซิร์ฟเวอร์
2. แก้ไขไฟล์คอนฟิก Nginx และแทนที่ทั้งสองส่วน server_name _; ด้วยโดเมนของคุณ (<your-domain>):
vim /etc/nginx/sites-available/automatisch
3. ติดตั้ง Certbot:
apt install -y certbot python3-certbot-nginx
4. รันคำสั่งต่อไปนี้เพื่อสร้างใบรับรอง Let's Encrypt ที่ถูกต้อง:
certbot --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. รีสตาร์ท Nginx เพื่อให้การเปลี่ยนแปลงมีผล:
systemctl restart nginx
6. เปิดเบราว์เซอร์แล้วไปที่: https://yourdomain.com