busman/docker-compose.yml

54 lines
1.1 KiB
YAML

version: '3.8'
services:
nginx:
build:
context: .
dockerfile: nginx.dockerfile
ports:
- "80:80"
volumes:
- ./src:/var/www/html
depends_on:
- mysql
- php
mysql:
image: mariadb:lts
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: laravel
MYSQL_USER: laravel
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
volumes:
- ./mysql:/var/lib/mysql
php:
build:
context: .
dockerfile: php.dockerfile
volumes:
- ./src:/var/www/html
composer:
build:
context: .
dockerfile: composer.dockerfile
volumes:
- ./src:/var/www/html
working_dir: /var/www/html
npm:
image: node:current-alpine
volumes:
- ./src:/var/www/html
entrypoint: ["npm"]
working_dir: /var/www/html
artisan:
build:
context: .
dockerfile: php.dockerfile
volumes:
- ./src:/var/www/html
working_dir: /var/www/html
depends_on:
- mysql
entrypoint: ["php", "/var/www/html/artisan"]