mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
82 lines
2.8 KiB
YAML
82 lines
2.8 KiB
YAML
# 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}
|
|
- 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 admin@example.com 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", "admin@example.com")->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
|