vbsgf
This commit is contained in:
5
.env
5
.env
@@ -1,2 +1,3 @@
|
|||||||
NEXTJS_WEBHOOK_URL=https://sizin-siteniz.com/api/webhooks/mail-signal
|
|
||||||
WEBHOOK_SECRET=buraya_guclu_bir_sifre_yazin
|
NEXTJS_WEBHOOK_URL=https://webmail.ayris.tech/api/webhooks/mail-signal
|
||||||
|
WEBHOOK_SECRET=besiktasK1903*
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
NEXTJS_WEBHOOK_URL=https://your-domain.com/api/webhooks/mail-signal
|
NEXTJS_WEBHOOK_URL=
|
||||||
WEBHOOK_SECRET=your_strong_secret_here
|
WEBHOOK_SECRET=
|
||||||
|
|||||||
86
README.md
86
README.md
@@ -2,82 +2,60 @@
|
|||||||
|
|
||||||
Mailcow Dovecot loglarını ve dosya sistemini izleyerek yeni gelen mailleri Next.js webhook'una ileten servis.
|
Mailcow Dovecot loglarını ve dosya sistemini izleyerek yeni gelen mailleri Next.js webhook'una ileten servis.
|
||||||
|
|
||||||
## Kurulum
|
## Kurulum (Türkçe)
|
||||||
|
|
||||||
### 1. Dosyaları Hazırlayın
|
### 1. Dosyaları Hazırlayın
|
||||||
Proje dizinine gidin ve `.env` dosyasını düzenleyin:
|
Örnek dosyayı kopyalayın ve bilgilerinizi girin:
|
||||||
```env
|
|
||||||
NEXTJS_WEBHOOK_URL=https://sizin-siteniz.com/api/webhooks/mail-signal
|
```bash
|
||||||
WEBHOOK_SECRET=buraya_guclu_bir_sifre_yazin
|
cp .env.example .env
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Yerel Çalıştırma
|
### 2. Çalıştırma (Docker Compose)
|
||||||
Node.js (v18+) yüklü olduğundan emin olun:
|
En kolay ve tavsiye edilen yöntem:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d --build
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Manuel Çalıştırma (Geliştirme)
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
npm start
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Docker ile Çalıştırma
|
|
||||||
En güvenli ve kolay yöntem Docker konteyneri olarak çalıştırmaktır:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Resmi oluşturun
|
|
||||||
docker build -t ayristech-worker .
|
|
||||||
|
|
||||||
# Konteyneri başlatın
|
|
||||||
docker run -d \
|
|
||||||
--name ayristech-worker \
|
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
||||||
-v /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/:/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/ \
|
|
||||||
--env-file .env \
|
|
||||||
--restart unless-stopped \
|
|
||||||
ayristech-worker
|
|
||||||
```
|
|
||||||
|
|
||||||
## Önemli Notlar
|
|
||||||
- **Docker Socket**: Servis `docker exec` komutu kullandığı için `/var/run/docker.sock` mount edilmelidir.
|
|
||||||
- **Vmail Volümü**: Mailcow'un mail dosyalarını sakladığı volüm `/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/` yoluna mount edilmelidir.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# AyrisTech Mail Worker (V10.3) - English
|
# AyrisTech Mail Worker (V10.3) - English
|
||||||
|
|
||||||
Service that monitors Mailcow Dovecot logs and filesystem to forward new incoming emails to a Next.js webhook.
|
Service that monitors Mailcow Dovecot logs and filesystem to forward new incoming emails to a Next.js webhook.
|
||||||
|
|
||||||
## Installation
|
## Installation (English)
|
||||||
|
|
||||||
### 1. Prepare Files
|
### 1. Prepare Files
|
||||||
Go to the project directory and edit the `.env` file (refer to `.env.example`):
|
Copy the example file and enter your details:
|
||||||
```env
|
|
||||||
NEXTJS_WEBHOOK_URL=https://your-domain.com/api/webhooks/mail-signal
|
```bash
|
||||||
WEBHOOK_SECRET=your_strong_secret_here
|
cp .env.example .env
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Run Locally
|
### 2. Execution (Docker Compose)
|
||||||
Ensure Node.js (v18+) is installed:
|
The easiest and recommended method:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d --build
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Manual Run (Development)
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
npm start
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Run with Docker
|
---
|
||||||
The most secure and easy method is to run as a Docker container:
|
|
||||||
|
|
||||||
```bash
|
## Önemli Notlar / Important Notes
|
||||||
# Build the image
|
- **TR**: Servis `docker exec` komutu kullandığı için `/var/run/docker.sock` erişimine ihtiyaç duyar.
|
||||||
docker build -t ayristech-worker .
|
- **EN**: The service requires access to `/var/run/docker.sock` to execute `docker exec` commands.
|
||||||
|
- **TR**: Mailcow mail dosyaları `/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/` yolunda olmalıdır.
|
||||||
# Start the container
|
- **EN**: Mailcow email files must be located at `/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/`.
|
||||||
docker run -d \
|
|
||||||
--name ayristech-worker \
|
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
||||||
-v /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/:/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/ \
|
|
||||||
--env-file .env \
|
|
||||||
--restart unless-stopped \
|
|
||||||
ayristech-worker
|
|
||||||
```
|
|
||||||
|
|
||||||
## Important Notes
|
|
||||||
- **Docker Socket**: The service uses the `docker exec` command, so `/var/run/docker.sock` must be mounted.
|
|
||||||
- **Vmail Volume**: The volume where Mailcow stores email files must be mounted to the path `/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/`.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user