forked from yiisoft/yii2-app-basic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
39 lines (39 loc) · 940 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: '2'
services:
php:
image: yiisoftware/yii2-php:7.4-fpm-nginx
volumes:
- ~/.composer-docker/cache:/root/.composer/cache:delegated
- ./:/app:delegated
- ./.docker/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
- ./.docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- '${WEB_SERVER_PORT}:80'
environment:
PHP_ENABLE_XDEBUG: 1
env_file:
- .env
database:
image: mariadb:10.11
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
restart: on-failure
volumes:
- db:/var/lib/mysql
ports:
- "${DB_PORT}:3306"
react:
build: ./frontend
command: npm start
ports:
- '3000:3000'
volumes:
- ./frontend:/app
- '/app/node_modules'
environment:
- WATCHPACK_POLLING=true
volumes:
db: