48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
services:
|
|
nginx:
|
|
build:
|
|
context: .
|
|
target: nginx
|
|
volumes:
|
|
- assets:/app/web/themes/custom/opdavies/build
|
|
- ./:/app
|
|
depends_on:
|
|
php:
|
|
condition: service_started
|
|
ports:
|
|
- "${DOCKER_WEB_PORT:-127.0.0.1:80}:80"
|
|
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
|
|
stop_grace_period: 3s
|
|
|
|
php:
|
|
build:
|
|
context: .
|
|
target: dev
|
|
image: ghcr.io/opdavies/oliverdavies-uk-php:7.4-alpine
|
|
volumes:
|
|
- ./:/app
|
|
env_file:
|
|
- .docker.env
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
|
|
stop_grace_period: 3s
|
|
|
|
mysql:
|
|
image: mariadb:10
|
|
volumes:
|
|
- "${DOCKER_MYSQL_VOLUME:-./db-data:/var/lib/mysql}"
|
|
- ./tools/assets/development:/docker-entrypoint-initdb.d
|
|
env_file:
|
|
- .env
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "bash", "-c", "echo > /dev/tcp/localhost/3306"]
|
|
interval: 1s
|
|
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
|
|
stop_grace_period: 3s
|
|
|
|
volumes:
|
|
assets:
|
|
mysql_data:
|