Peppermint

An open source issue management & help desk solution.

เข้าถึง

Web interface: https://<SERVER_IP>

API endpoint: https://<SERVER_IP>:5004

Default admin credentials:

Change the admin credentials immediately after first login.

Self-Signed Certificate Notice

This installation uses a self-signed TLS certificate.

A browser SSL warning is expected.

For API calls using curl, you must ignore certificate validation:

curl -k https://<SERVER_IP>:5004

The -k flag tells curl to skip TLS certificate verification.

Example to obtain API token:

curl -k https://<SERVER_IP>:5004/api/v1/auth/login 
  -H "Content-Type: application/json" 
  -d '{"email":"[email protected]","password":"1234"}'

This returns a JSON response containing a token.

Example to obtain API token:

curl -k -i https://<SERVER_IP>:5004/api/v1/<VALID_ENDPOINT> 
  -H "Authorization: Bearer <TOKEN>"

For production environments, replace the self-signed certificate with a trusted SSL certificate (e.g., Let’s Encrypt).

ไฟล์และไดเร็กทอรีที่สำคัญ

  • ไดเร็กทอรีการติดตั้ง: /root/peppermint
  • Environment variables (DB credentials, secrets, BASE_URL): /root/peppermint/.env
  • การตั้งค่า Docker Compose: /root/peppermint/docker-compose.yml
  • PostgreSQL persistent data (Docker volume): /var/lib/docker/volumes/pgdata/_data
  • Nginx reverse proxy configs: /etc/nginx/conf.d/peppermint-client.conf & /etc/nginx/conf.d/peppermint-api.conf
  • TLS certificates (self-signed or Let’s Encrypt): /etc/nginx/ssl/

การเปิดใช้งาน SSL กับโดเมน

1. ชี้โดเมนของคุณไปยังที่อยู่ IP ของเซิร์ฟเวอร์

2. แก้ไข /root/peppermint/.env ไฟล์สำหรับตั้งชื่อโดเมน: BASE_URL=https://your.domain.com

3. สร้างบริการขึ้นมาใหม่:

cd /root/peppermint/
docker compose up -d

4. Edit Nginx configs and replace server_name <IP>; ด้วยโดเมนของคุณ (<your-domain>สำหรับทั้งบล็อก HTTP (พอร์ต 80) และ HTTPS (พอร์ต 443):

vim /etc/nginx/conf.d/peppermint-client.conf
vim /etc/nginx/conf.d/peppermint-api.conf

5. ติดตั้ง 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. แทนที่เส้นทาง SSL ในไฟล์การตั้งค่า Nginx (ส่วน TLS):

vim /etc/nginx/conf.d/peppermint-client.conf
vim /etc/nginx/conf.d/peppermint-api.conf

# 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. เปิดเบราว์เซอร์ของคุณและไปที่: https://yourdomain.com

รายละเอียดการสมัคร