Files
Aigo/docker-compose.yml
T

50 lines
1.1 KiB
YAML

services:
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
ports:
- "80"
volumes:
- app-public:/var/www/html/public:ro
- app-storage:/var/www/html/storage:ro
depends_on:
app:
condition: service_started
app:
build:
context: .
volumes:
- app-public:/var/www/html/public
- app-storage:/var/www/html/storage
environment:
DB_HOST: mysql
DB_DATABASE: ${DB_DATABASE:-aigo}
DB_USERNAME: ${DB_USERNAME:-aigo}
DB_PASSWORD: ${DB_PASSWORD}
depends_on:
mysql:
condition: service_healthy
mysql:
image: mariadb:10.6
volumes:
- mysql-data:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_DATABASE:-aigo}
MYSQL_USER: ${DB_USERNAME:-aigo}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s
volumes:
app-public:
app-storage:
mysql-data: