From 3f58c77e187af4c9b04544b5ca25ba00571d12b2 Mon Sep 17 00:00:00 2001 From: docker Date: Wed, 31 Dec 2025 07:35:33 +0000 Subject: [PATCH] Updates --- README.md | 144 +++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 6 ++ 2 files changed, 150 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f530762 --- /dev/null +++ b/README.md @@ -0,0 +1,144 @@ +# osTicket Docker Setup with Email Integration + +Complete Docker Compose setup for osTicket with integrated email piping via docker-mailserver. + +## 🚀 Features + +- **osTicket v1.18.2** with PHP 8.2 and Apache +- **MariaDB** for persistent database storage +- **docker-mailserver** for complete email handling +- **Automatic ticket creation** from emails via API piping +- **SSL/TLS support** with Let's Encrypt certificates +- **Persistent volumes** for data retention + +## 📋 Prerequisites + +- Docker Engine 20.10+ +- Docker Compose 2.0+ +- Domain with proper DNS records (MX, A, SPF, DKIM, DMARC) +- SSL certificates (or use Let's Encrypt) + +## 🔧 Quick Start + +### 1. Clone & Configure +```bash +git clone https://gitea.matthu.net/matt/osticket-docker.git +cd osticket-docker +cp .env.example .env +``` + +Edit `.env` with your values: +- Database credentials +- Domain name +- SSL certificate paths +- Network IPs (if needed) + +### 2. Start Services +```bash +docker-compose up -d +``` + +### 3. Install osTicket + +1. Navigate to `http://your-domain` +2. Follow installation wizard +3. Database settings: + - Host: `mysql` + - Database: (from .env) + - User: (from .env) + - Password: (from .env) + +### 4. Configure API Key + +1. Login to osTicket admin panel +2. Go to **Admin Panel** → **Manage** → **API Keys** +3. Click **Add New API Key**: + - IP Address: `172.20.0.30` (mailserver IP) + - Can Create Tickets: ✓ Checked + - Status: Active +4. Copy the API key to `.env` as `OSTICKET_API_KEY` +5. Restart: `docker-compose restart mailserver` + +### 5. Create Email Account +```bash +docker exec ost-mailserver setup email add support@yourdomain.com +``` + +Enter a password when prompted. + +## 📁 Project Structure +``` +. +├── docker-compose.yml # Service orchestration +├── apache.dockerfile # Custom Apache/PHP image +├── .env # Environment variables (not in git) +├── .env.example # Template for .env +├── reset-ost.sh # Reset script (⚠️ deletes all data) +├── osTicket-v1.18.2/ # osTicket application +├── mariadb/ # Database storage (persistent) +└── docker-data/ + └── dms/ + ├── config/ + │ ├── user-patches.sh # Postfix configuration + │ └── scripts/ + │ └── pipe-to-osticket.sh # Email→API bridge + ├── mail-data/ # Mail storage (persistent) + ├── mail-state/ # Mail state (persistent) + └── mail-logs/ # Mail logs +``` + +## 🔍 Troubleshooting + +### Check Email Piping +```bash +# View pipe logs +docker exec ost-mailserver cat /tmp/osticket-pipe.log + +# View mail server logs +docker exec ost-mailserver tail -f /var/log/mail/mail.log + +# Send test email +docker exec ost-mailserver sendmail support@yourdomain.com <