125 lines
3.0 KiB
YAML
125 lines
3.0 KiB
YAML
name: ${STACK_NAME:-clupilot}
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:1.27-alpine
|
|
container_name: ${STACK_NAME:-clupilot}-nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${HTTP_PORT:-80}:80"
|
|
volumes:
|
|
- ./app:/var/www/html
|
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
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://localhost/"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
app:
|
|
build: ./docker/php
|
|
image: ${STACK_NAME:-clupilot}/php:latest
|
|
container_name: ${STACK_NAME:-clupilot}-app
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./app:/var/www/html
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks: [clu]
|
|
|
|
queue:
|
|
image: ${STACK_NAME:-clupilot}/php:latest
|
|
container_name: ${STACK_NAME:-clupilot}-queue
|
|
restart: unless-stopped
|
|
command: php artisan queue:work --tries=3 --timeout=120
|
|
volumes:
|
|
- ./app:/var/www/html
|
|
depends_on:
|
|
app:
|
|
condition: service_started
|
|
networks: [clu]
|
|
|
|
scheduler:
|
|
image: ${STACK_NAME:-clupilot}/php:latest
|
|
container_name: ${STACK_NAME:-clupilot}-scheduler
|
|
restart: unless-stopped
|
|
command: php artisan schedule:work
|
|
volumes:
|
|
- ./app:/var/www/html
|
|
depends_on:
|
|
app:
|
|
condition: service_started
|
|
networks: [clu]
|
|
|
|
reverb:
|
|
image: ${STACK_NAME:-clupilot}/php:latest
|
|
container_name: ${STACK_NAME:-clupilot}-reverb
|
|
restart: unless-stopped
|
|
command: php artisan reverb:start --host=0.0.0.0 --port=8080
|
|
volumes:
|
|
- ./app:/var/www/html
|
|
depends_on:
|
|
app:
|
|
condition: service_started
|
|
networks: [clu]
|
|
|
|
mysql:
|
|
image: mariadb:11
|
|
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:7-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:
|
|
|
|
networks:
|
|
clu:
|
|
driver: bridge
|