93 lines
2.2 KiB
YAML
93 lines
2.2 KiB
YAML
# CluPilot — DEV stack. Everything runs in containers (host has only Docker).
|
|
# `app` = php-fpm + nginx + vite (supervisor). reverb/queue reuse the image.
|
|
# Ports + UID are env-driven (see .env). No secrets hardcoded here.
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/php/Dockerfile
|
|
args:
|
|
HOST_UID: ${HOST_UID:-1000}
|
|
HOST_GID: ${HOST_GID:-1000}
|
|
image: clupilot-app:dev
|
|
restart: unless-stopped
|
|
volumes:
|
|
- .:/var/www/html
|
|
ports:
|
|
- "${APP_PORT:-80}:80"
|
|
- "${VITE_PORT:-5173}:5173"
|
|
env_file: .env
|
|
depends_on:
|
|
mariadb:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_started
|
|
|
|
reverb:
|
|
image: clupilot-app:dev
|
|
restart: unless-stopped
|
|
command: php artisan reverb:start --host=0.0.0.0 --port=8080
|
|
volumes:
|
|
- .:/var/www/html
|
|
ports:
|
|
- "${REVERB_HOST_PORT:-8080}:8080"
|
|
env_file: .env
|
|
depends_on:
|
|
- app
|
|
- redis
|
|
|
|
queue:
|
|
image: clupilot-app:dev
|
|
restart: unless-stopped
|
|
command: php artisan queue:work redis --tries=3 --timeout=90
|
|
volumes:
|
|
- .:/var/www/html
|
|
env_file: .env
|
|
depends_on:
|
|
- app
|
|
- redis
|
|
- mariadb
|
|
|
|
scheduler:
|
|
image: clupilot-app:dev
|
|
restart: unless-stopped
|
|
command: php artisan schedule:work
|
|
volumes:
|
|
- .:/var/www/html
|
|
env_file: .env
|
|
depends_on:
|
|
- app
|
|
- redis
|
|
- mariadb
|
|
|
|
mariadb:
|
|
image: mariadb:11.4
|
|
restart: unless-stopped
|
|
environment:
|
|
MARIADB_DATABASE: ${DB_DATABASE:-clupilot}
|
|
MARIADB_USER: ${DB_USERNAME:-clupilot}
|
|
MARIADB_PASSWORD: ${DB_PASSWORD}
|
|
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
|
ports:
|
|
# host-side port is separate from DB_PORT (which Laravel uses to reach
|
|
# mariadb:3306 inside the network) so changing it can't break the app.
|
|
- "127.0.0.1:${DB_HOST_PORT:-3306}:3306"
|
|
volumes:
|
|
- db-data:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis-data:/data
|
|
|
|
volumes:
|
|
db-data:
|
|
redis-data:
|