clupilot/docker-compose.portainer.yml

166 lines
4.4 KiB
YAML

name: ${STACK_NAME:-clupilot}
x-php-env: &php-env
APP_NAME: ${APP_NAME:-CluPilot}
APP_ENV: ${APP_ENV:-production}
APP_KEY: ${APP_KEY:?APP_KEY required — run php artisan key:generate locally and paste the value}
APP_DEBUG: ${APP_DEBUG:-false}
APP_URL: ${APP_URL:-http://localhost}
LOG_CHANNEL: stack
LOG_LEVEL: ${LOG_LEVEL:-info}
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: ${DB_DATABASE:-clupilot}
DB_USERNAME: ${DB_USERNAME:-clupilot}
DB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD required}
REDIS_HOST: redis
REDIS_PORT: 6379
CACHE_STORE: redis
SESSION_DRIVER: redis
QUEUE_CONNECTION: redis
BROADCAST_CONNECTION: reverb
REVERB_APP_ID: ${REVERB_APP_ID:-clupilot}
REVERB_APP_KEY: ${REVERB_APP_KEY:?REVERB_APP_KEY required}
REVERB_APP_SECRET: ${REVERB_APP_SECRET:?REVERB_APP_SECRET required}
REVERB_HOST: 0.0.0.0
REVERB_PORT: 8080
REVERB_SCHEME: http
MAIL_MAILER: ${MAIL_MAILER:-log}
MAIL_HOST: ${MAIL_HOST:-mailpit}
MAIL_PORT: ${MAIL_PORT:-1025}
MAIL_FROM_ADDRESS: ${MAIL_FROM_ADDRESS:-no-reply@clupilot.local}
MAIL_FROM_NAME: ${APP_NAME:-CluPilot}
services:
nginx:
image: ${STACK_NAME:-clupilot}/nginx:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-nginx
restart: unless-stopped
ports:
- "${HTTP_PORT:-80}:80"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
app:
condition: service_started
reverb:
condition: service_started
networks: [clu]
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1/"]
interval: 30s
timeout: 5s
retries: 3
app:
image: ${STACK_NAME:-clupilot}/php:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-app
restart: unless-stopped
environment: *php-env
volumes:
- app-storage:/var/www/html/storage
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
networks: [clu]
queue:
image: ${STACK_NAME:-clupilot}/php:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-queue
restart: unless-stopped
command: php artisan queue:work --tries=3 --timeout=120
environment: *php-env
volumes:
- app-storage:/var/www/html/storage
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
app:
condition: service_started
networks: [clu]
scheduler:
image: ${STACK_NAME:-clupilot}/php:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-scheduler
restart: unless-stopped
command: php artisan schedule:work
environment: *php-env
volumes:
- app-storage:/var/www/html/storage
depends_on:
mysql:
condition: service_healthy
app:
condition: service_started
networks: [clu]
reverb:
image: ${STACK_NAME:-clupilot}/php:${APP_VERSION:-dev}
container_name: ${STACK_NAME:-clupilot}-reverb
restart: unless-stopped
command: php artisan reverb:start --host=0.0.0.0 --port=8080
environment: *php-env
volumes:
- app-storage:/var/www/html/storage
depends_on:
redis:
condition: service_healthy
app:
condition: service_started
networks: [clu]
mysql:
image: mariadb:${MARIADB_VERSION:-11.4}
container_name: ${STACK_NAME:-clupilot}-mysql
restart: unless-stopped
environment:
MARIADB_DATABASE: ${DB_DATABASE:-clupilot}
MARIADB_USER: ${DB_USERNAME:-clupilot}
MARIADB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD required}
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:?DB_ROOT_PASSWORD required}
volumes:
- mysql-data:/var/lib/mysql
networks: [clu]
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
redis:
image: redis:${REDIS_VERSION:-7.4-alpine}
container_name: ${STACK_NAME:-clupilot}-redis
restart: unless-stopped
volumes:
- redis-data:/data
networks: [clu]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
mailpit:
image: axllent/mailpit:latest
container_name: ${STACK_NAME:-clupilot}-mailpit
restart: unless-stopped
profiles: ["dev"]
ports:
- "${MAILPIT_UI_PORT:-8025}:8025"
networks: [clu]
volumes:
mysql-data:
redis-data:
app-storage:
networks:
clu:
driver: bridge