Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

2.8 KB
Raw Blame
# 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:[email protected]}
      - ADMIN_PASSWORD=${SERVICE_PASSWORD_ADMIN}
    volumes:
      - mixpost-storage:/var/www/html/storage/app
      - mixpost-logs:/var/www/html/storage/logs
      - type: bind
        source: ./etc/coolify-start.sh
        target: /usr/local/bin/coolify-start.sh
        mode: "0755"
        content: |
          #!/bin/sh
          # start.sh always creates [email protected] with the password "changeme".
          # Replace that password with ADMIN_PASSWORD once, while it is still the default.
          (
            for i in $(seq 1 60); do
              sleep 5
              result=$(php /var/www/html/artisan tinker --no-ansi --execute='$u = Inovector\MixpostAuth\MixpostAuth::getUserClass()::where("email", "[email protected]")->first(); if (! $u) { echo "wait"; } elseif (Illuminate\Support\Facades\Hash::check("changeme", $u->password)) { $u->password = bcrypt(getenv("ADMIN_PASSWORD")); $u->save(); echo "done"; } else { echo "done"; }' 2>/dev/null)
              [ "$result" = "done" ] && break
            done
          ) &
          exec /usr/local/bin/start.sh
    entrypoint: ["/usr/local/bin/coolify-start.sh"]
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS -o /dev/null http://127.0.0.1/mixpost/login || exit 1"]
      start_period: 60s
      interval: 10s
      timeout: 10s
      retries: 10
    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