Files
mixpost/docker-compose.yml
T

141 lines
3.7 KiB
YAML

# Mixpost - Self-hosted social media management (Laravel)
# https://docs.mixpost.app/installation/docker
# https://github.com/inovector/mixpost
#
# Stack: app (Laravel + nginx), horizon, scheduler, MySQL 8.0, Redis 7
services:
app:
image: inovector/mixpost:latest
restart: always
environment:
APP_NAME: Mixpost
APP_ENV: production
APP_KEY: base64:AdNNBZUvMxmgU2IrG34A1M/SdwTVBnlfkbzwNaYeCTg=
APP_DEBUG: "false"
APP_URL: https://mixpost.fluxtechnologies.uk
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: "3306"
DB_DATABASE: mixpost
DB_USERNAME: mixpost
DB_PASSWORD: 282a989ffe21a5db3daa757f29871a57
REDIS_HOST: redis
REDIS_PORT: "6379"
CACHE_DRIVER: redis
QUEUE_CONNECTION: redis
SESSION_DRIVER: redis
MAIL_MAILER: log
LOG_CHANNEL: stderr
# Fix: avoid chown hanging on large volumes
NGINX_RUN_USER: root
WWWUSER: root
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- coolify
labels:
- traefik.enable=true
- traefik.http.routers.mixpost.rule=Host(`mixpost.fluxtechnologies.uk`)
- traefik.http.routers.mixpost.tls=true
- traefik.http.routers.mixpost.tls.certresolver=letsencrypt
- traefik.http.services.mixpost.loadbalancer.server.port=80
- coolify.managed=true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/api/mixpost"]
interval: 30s
timeout: 10s
retries: 3
horizon:
image: inovector/mixpost:latest
restart: always
command: php artisan horizon
environment:
APP_NAME: Mixpost
APP_ENV: production
APP_KEY: base64:AdNNBZUvMxmgU2IrG34A1M/SdwTVBnlfkbzwNaYeCTg=
APP_URL: https://mixpost.fluxtechnologies.uk
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: "3306"
DB_DATABASE: mixpost
DB_USERNAME: mixpost
DB_PASSWORD: 282a989ffe21a5db3daa757f29871a57
REDIS_HOST: redis
REDIS_PORT: "6379"
CACHE_DRIVER: redis
QUEUE_CONNECTION: redis
SESSION_DRIVER: redis
NGINX_RUN_USER: root
WWWUSER: root
depends_on:
app:
condition: service_started
networks:
- coolify
scheduler:
image: inovector/mixpost:latest
restart: always
command: sh -c "while true; do php artisan schedule:run; sleep 60; done"
environment:
APP_NAME: Mixpost
APP_ENV: production
APP_KEY: base64:AdNNBZUvMxmgU2IrG34A1M/SdwTVBnlfkbzwNaYeCTg=
APP_URL: https://mixpost.fluxtechnologies.uk
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: "3306"
DB_DATABASE: mixpost
DB_USERNAME: mixpost
DB_PASSWORD: 282a989ffe21a5db3daa757f29871a57
REDIS_HOST: redis
REDIS_PORT: "6379"
CACHE_DRIVER: redis
QUEUE_CONNECTION: redis
SESSION_DRIVER: redis
NGINX_RUN_USER: root
WWWUSER: root
networks:
- coolify
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: fe21dcf3a9658d24850ed7d7f66fa2f9
MYSQL_DATABASE: mixpost
MYSQL_USER: mixpost
MYSQL_PASSWORD: 282a989ffe21a5db3daa757f29871a57
volumes:
- mixpost-db:/var/lib/mysql
networks:
- coolify
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: always
networks:
- coolify
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
mixpost-db:
networks:
coolify:
external: true