# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 🚀 BUILT & MAINTAINED BY THE ALTSTACK
# 🌍 https://thealtstack.com
# 💡 Open-source deployment templates for modern self-hosting.
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━




services:
  mautic:
    image: mautic/mautic:latest
    container_name: mautic
    restart: unless-stopped
    depends_on:
      - db
    ports:
      - "8080:80"
    environment:
      - MAUTIC_DB_HOST=db
      - MAUTIC_DB_USER=mautic
      - MAUTIC_DB_PASSWORD=mautic
      - MAUTIC_DB_NAME=mautic
      - MAUTIC_RUN_CRON_JOBS=true
    volumes:
      - mautic_data:/var/www/html

  db:
    image: mysql:5.7
    container_name: mautic-db
    restart: unless-stopped
    command: --default-authentication-plugin=mysql_native_password
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_USER=mautic
      - MYSQL_PASSWORD=mautic
      - MYSQL_DATABASE=mautic
    volumes:
      - mautic_db_data:/var/lib/mysql

volumes:
  mautic_data:
  mautic_db_data:
