-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
56 lines (52 loc) · 1.47 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
54
55
56
version: '3.8'
services:
php-course-app:
container_name: php-course-app
build: $PWD/docker/image
command:
- /var/www/docker/docker-entrypoint
environment:
# Параметры приложения
- APP_ENV=dev
- APP_DATABASE_DSN=pdo-mysql://php-course-app:gX5t2UUbBn@php-course-db/php_course
# Параметры скрипта docker-entrypoint
- USER_ID=${USER_ID:-1000}
- USER_NAME=$USER
# Параметры расширения XDebug
- XDEBUG_MODE=debug
- XDEBUG_CONFIG="idekey=123"
- PHP_IDE_CONFIG=serverName=localhost
working_dir: /var/www
volumes:
- $PWD/:/var/www
depends_on:
- php-course-db
extra_hosts:
- "host.docker.internal:host-gateway"
php-course-nginx:
image: nginx:1.17
container_name: php-course-nginx
working_dir: /var/www
volumes:
- $PWD/:/var/www
- $PWD/docker/config/nginx.conf.d/:/etc/nginx/conf.d/:ro
depends_on:
- php-course-app
ports:
- "127.0.0.1:80:80"
php-course-db:
image: mysql:8.0.32
container_name: php-course-db
hostname: php-course-db
environment:
- MYSQL_ROOT_PASSWORD=J8lzl2NnWX
- MYSQL_USER=php-course-app
- MYSQL_PASSWORD=gX5t2UUbBn
- MYSQL_DATABASE=php_course
volumes:
- $PWD/docker/config/mysql.conf.d:/etc/mysql/conf.d/:ro
- php_course_db_data:/var/lib/mysql
ports:
- "127.0.0.1:3306:3306"
volumes:
php_course_db_data: