iteo/docker-compose.yaml
2024-04-14 22:59:22 +02:00

40 lines
766 B
YAML

services:
nginx:
image: nginx:latest
depends_on:
- symfony
ports:
- "80:80"
volumes:
- ./docker/nginx:/etc/nginx/conf.d
- ./:/var/www
symfony:
build: .
depends_on:
mariadb:
condition: service_healthy
command: ["php-fpm"]
volumes:
- ./:/var/www
mariadb:
image: mariadb:10.7
restart: unless-stopped
healthcheck:
test: mysql $$MYSQL_DATABASE -u$$MYSQL_USER -p$$MYSQL_PASSWORD -e 'SELECT 1;'
retries: 120
interval: 1s
ports:
- "3306:3306"
environment:
- MYSQL_USER=iteo
- MYSQL_PASSWORD=iteo
- MYSQL_DATABASE=iteo
- MARIADB_RANDOM_ROOT_PASSWORD=1
volumes:
- mysql_data:/var/lib/mysql
volumes:
mysql_data: