82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
name: airservice
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: app
|
|
container_name: airservice_app
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
expose:
|
|
- "9000"
|
|
volumes:
|
|
- storage_public:/var/www/html/storage/app/public
|
|
- storage_attachments:/var/www/html/storage/app/request-attachments
|
|
- storage_logs:/var/www/html/storage/logs
|
|
- sqlite_data:/var/www/html/database/sqlite
|
|
networks:
|
|
- backend
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "php-fpm -t 2>&1 | grep -q 'successful' && echo ok || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
queue:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: app
|
|
container_name: airservice_queue
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
command: ["php", "artisan", "queue:work", "--sleep=3", "--tries=3", "--max-time=3600"]
|
|
volumes:
|
|
- storage_public:/var/www/html/storage/app/public
|
|
- storage_attachments:/var/www/html/storage/app/request-attachments
|
|
- storage_logs:/var/www/html/storage/logs
|
|
- sqlite_data:/var/www/html/database/sqlite
|
|
networks:
|
|
- backend
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
|
|
nginx:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: web
|
|
container_name: airservice_nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "10.20.0.25:18084:80"
|
|
volumes:
|
|
- storage_public:/var/www/html/public/storage:ro
|
|
networks:
|
|
- backend
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/health | grep -q ok"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
networks:
|
|
backend:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
sqlite_data:
|
|
storage_public:
|
|
storage_attachments:
|
|
storage_logs:
|