-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
53 lines (49 loc) · 1.02 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: '3.8'
volumes:
db_data: {}
services:
php:
container_name: php-school-fpm
build:
context: .
dockerfile: .docker/files/php-school-fpm/Dockerfile
target: ${DOCKER_BUILD_TARGET-prod}
volumes:
- .:/var/www/html
environment:
- DISPLAY_ERRORS=true
- XDEBUG_CONFIG="idekey=PHPSTORM"
env_file:
- .env
ports:
- 9000
depends_on:
- "db"
db:
container_name: php-school-db
image: mysql:latest
volumes:
- db_data:/var/lib/mysql
ports:
- 3306:3306
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=phpschool
- MYSQL_USER=phpschool
- MYSQL_PASSWORD=phpschool
nginx:
container_name: php-school-nginx
image: nginx:latest
links:
- php
ports:
- 80:80
volumes:
- .docker/files/nginx-dev.conf:/etc/nginx/conf.d/default.conf
- .:/var/www/html
redis:
container_name: php-school-redis
image: redis
ports:
- 6379:6379