Skip to content

Instantly share code, notes, and snippets.

@raelsei
Created July 8, 2025 10:54
Show Gist options
  • Select an option

  • Save raelsei/d84d8588ad882b63e4da5d974df52920 to your computer and use it in GitHub Desktop.

Select an option

Save raelsei/d84d8588ad882b63e4da5d974df52920 to your computer and use it in GitHub Desktop.
Postal Mail Compose File
version: '3.8'
services:
postal-mariadb:
image: mariadb:latest
container_name: postal-mariadb
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: postal-root-password
MARIADB_DATABASE: postal
MARIADB_USER: postal
MARIADB_PASSWORD: postal-password
volumes:
- postal-mariadb-data:/var/lib/mysql
networks:
- postal-network
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
postal-rabbitmq:
image: rabbitmq:3-management
container_name: postal-rabbitmq
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_USER: postal
RABBITMQ_DEFAULT_PASS: postal-rabbitmq-password
volumes:
- postal-rabbitmq-data:/var/lib/rabbitmq
networks:
- postal-network
ports:
- "15672:15672" # RabbitMQ Management UI (opsiyonel)
postal-app:
image: ghcr.io/postalserver/postal:latest
container_name: postal-app
restart: unless-stopped
depends_on:
- postal-mariadb
- postal-rabbitmq
environment:
# Veritabanı ayarları
POSTAL_DATABASE_HOST: postal-mariadb
POSTAL_DATABASE_PORT: 3306
POSTAL_DATABASE_NAME: postal
POSTAL_DATABASE_USERNAME: postal
POSTAL_DATABASE_PASSWORD: postal-password
# RabbitMQ ayarları
POSTAL_RABBITMQ_HOST: postal-rabbitmq
POSTAL_RABBITMQ_PORT: 5672
POSTAL_RABBITMQ_USERNAME: postal
POSTAL_RABBITMQ_PASSWORD: postal-rabbitmq-password
POSTAL_RABBITMQ_VHOST: /
# Genel ayarlar
POSTAL_WEB_HOSTNAME: postal.yourdomain.com
POSTAL_WEB_PROTOCOL: https
POSTAL_SECRET_KEY: your-secret-key-here-change-this
# SMTP ayarları
POSTAL_SMTP_PORT: 25
POSTAL_SMTP_SSL_PORT: 465
POSTAL_SMTP_TLS_PORT: 587
# Log seviyesi
POSTAL_LOG_LEVEL: info
volumes:
- postal-app-data:/app/storage
- postal-config:/app/config
networks:
- postal-network
ports:
- "80:8080" # Web interface
- "25:25" # SMTP
- "587:587" # SMTP TLS
- "465:465" # SMTP SSL
# Healthcheck
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
postal-mariadb-data:
driver: local
postal-rabbitmq-data:
driver: local
postal-app-data:
driver: local
postal-config:
driver: local
networks:
postal-network:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment