oliverdavies.uk-drupal-old/docker-compose.yaml

69 lines
1.8 KiB
YAML

version: '2.4'
volumes:
assets:
mysql_data:
node_modules:
services:
nginx:
build:
context: .
target: nginx
volumes:
- assets:/app/web/themes/custom/opdavies/build
- node_modules:/app/web/themes/custom/opdavies/node_modules
- ./:/app
depends_on:
php:
condition: service_started
ports:
- "${DOCKER_WEB_PORT:-127.0.0.1:80}:80"
restart: unless-stopped
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: unless-stopped
mysql:
image: mariadb:10
volumes:
- "${DOCKER_MYSQL_VOLUME:-./db-data:/var/lib/mysql}"
- ./tools/assets/development:/docker-entrypoint-initdb.d
env_file:
- .docker.env
healthcheck:
test: ["CMD-SHELL", "bash", "-c", "echo > /dev/tcp/localhost/3306"]
interval: 1s
restart: unless-stopped
node:
build:
context: .
target: assets
image: ghcr.io/opdavies/oliverdavies-uk-assets:node-14
working_dir: /node
entrypoint: sh
volumes:
- assets:/node/build
- node_modules:/node/node_modules
- ./config:/node/config
- ./web/themes/custom/opdavies/assets:/node/assets
- ./web/themes/custom/opdavies/package.json:/node/package.json
- ./web/themes/custom/opdavies/yarn.lock:/node/yarn.lock
- ./web/themes/custom/opdavies/postcss.config.js:/node/postcss.config.js
- ./web/themes/custom/opdavies/tailwindcss:/node/tailwindcss
- ./web/themes/custom/opdavies/tailwind.config.js:/node/tailwind.config.js
- ./web/themes/custom/opdavies/templates:/node/templates
- ./web/themes/custom/opdavies/webpack.config.js:/node/webpack.config.js