-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (44 loc) · 1.26 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
services:
php-fpm:
container_name: phpdock-php-fpm-latest
image: ${COMPOSE_PROJECT_NAME}:${PHP_VERSION}
build:
context: .
dockerfile: Dockerfile
args:
- PHP_VERSION=${PHP_VERSION}
- PHP_EXTENSIONS=${PHP_EXTENSIONS}
- APP_CODE_PATH_CONTAINER=${APP_CODE_PATH_CONTAINER}
environment:
- XDEBUG_CLIENT_HOST=${XDEBUG_CLIENT_HOST}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
args:
- NGINX_VERSION=${NGINX_VERSION}
environment:
- APP_CODE_PATH_CONTAINER=${APP_CODE_PATH_CONTAINER}
- SELF_SIGNED_SSL=1
- PHP_FPM_HOST=${PHP_FPM_HOST}
- PHP_FPM_PORT=${PHP_FPM_PORT}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
ports:
- "80:80"
- "443:443"
mariadb:
image: mariadb:${DB_VERSION}
environment:
- MARIADB_DATABASE=${DB_DATABASE}
- MARIADB_USER=${DB_USER}
- MARIADB_PASSWORD=${DB_PASSWORD}
- MARIADB_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
volumes:
- ${DB_CNF_FILE}:/etc/mysql/my.cnf
- ${DATA_PATH_HOST}/mariadb:/var/lib/mysql
- ${DB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
ports:
- "3306:3306"