Files
webmailserver/docker-compose.unified.yml

54 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
services:
# 1. Veritabanı
db:
image: postgres:15-alpine
container_name: ayrismail-db
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ayris_pass_123}
POSTGRES_DB: ayrismail
volumes:
- postgres_data:/var/lib/postgresql/data
# 2. Next.js Uygulaması (Panel)
app:
build:
context: ./mailserver
dockerfile: Dockerfile
container_name: ayrismail-app
restart: always
ports:
- "3000:3000"
environment:
DATABASE_URL: "postgresql://postgres:${POSTGRES_PASSWORD:-ayris_pass_123}@db:5432/ayrismail"
MAILCOW_API_URL: ${MAILCOW_API_URL}
MAILCOW_API_KEY: ${MAILCOW_API_KEY}
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
WEBHOOK_SIGNAL_SECRET: ${WEBHOOK_SIGNAL_SECRET}
AUTH_SECRET: ${AUTH_SECRET}
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
depends_on:
- db
# 3. Ayris Worker (Mail İzleyici)
worker:
build:
context: ../ayristech-worker
dockerfile: Dockerfile
container_name: ayrismail-worker
restart: always
volumes:
- /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data:/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data:ro
- /var/run/docker.sock:/var/run/docker.sock
environment:
NEXTJS_WEBHOOK_URL: "http://app:3000/api/webhooks/mail-signal"
WEBHOOK_SECRET: ${WEBHOOK_SIGNAL_SECRET}
depends_on:
- app
volumes:
postgres_data: