# documentation: https://docs.mixpost.app/lite
# slogan: Mixpost is a robust and versatile social media management software, designed to streamline social media operations and enhance content marketing strategies.
# category: analytics
# tags: social media, marketing, content, management, automation, self-hosted
# logo: svgs/mixpost.svg
# port: 80

services:
  mixpost:
    image: 'inovector/mixpost:latest'
    environment:
      - SERVICE_URL_MIXPOST
      - APP_NAME=Mixpost
      - APP_KEY=${SERVICE_BASE64_MIXPOST}
      - APP_DEBUG=false
      - APP_DOMAIN=${SERVICE_URL_MIXPOST}
      - APP_URL=${SERVICE_URL_MIXPOST}
      - DB_DATABASE=${MYSQL_DATABASE:-mixpost_db}
      - DB_USERNAME=${SERVICE_USER_MYSQL}
      - DB_PASSWORD=${SERVICE_PASSWORD_MYSQL}
      - SSL_EMAIL=${SSL_EMAIL:-user@example.com}
    volumes:
      - mixpost-storage:/var/www/html/storage/app
      - mixpost-logs:/var/www/html/storage/logs
    depends_on:
      - mysql
      - redis
  mysql:
    image: 'mysql/mysql-server:8.0'
    environment:
      - MYSQL_DATABASE=${MYSQL_DATABASE:-mixpost_db}
      - MYSQL_USER=${SERVICE_USER_MYSQL}
      - MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}
      - MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQLROOT}
    volumes:
      - mixpost-mysql:/var/lib/mysql
    healthcheck:
      test:
        - CMD
        - mysqladmin
        - ping
        - '-h'
        - 127.0.0.1
        - '-uroot'
        - '-p${SERVICE_PASSWORD_MYSQLROOT}'
      interval: 5s
      timeout: 20s
      retries: 10
  redis:
    image: 'redis:alpine'
    healthcheck:
      test:
        - CMD
        - redis-cli
        - '--raw'
        - incr
        - ping
