-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
49 lines (45 loc) · 1.25 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
version: '3.9'
services:
nginx:
container_name: nginx
image: nginx:alpine
restart: always
ports:
- "80:80"
volumes:
- ./projects:/projects
- ./nginx/:/etc/nginx/conf.d
networks:
- nginxnetwork
database:
image: mariadb:10.10
restart: always
volumes:
- ./database/container:/var/lib/mysql
- ./database:/database
ports:
- ${MYSQL_PORT}:3306
environment:
MYSQL_ROOT_PASSWORD: "$MYSQL_ROOT_PASSWORD"
command: --default-authentication-plugin=mysql_native_password --group_concat_max_len=4294967295 --sql_mode="STRICT_TRANS_TABLES" --default_time_zone=-03:00 --event_scheduler="on" --max_allowed_packet=1073741824
networks:
- nginxnetwork
php:
container_name: php
build: ./docker/php/${PHP_VERSION}
volumes:
- ./projects:/projects
- ./docker/php/${PHP_VERSION}/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
environment:
MYSQL_TYPE: "$MYSQL_TYPE"
MYSQL_HOST: "$MYSQL_HOST"
MYSQL_DBNAME: "$MYSQL_DBNAME"
MYSQL_USER: "$MYSQL_USER"
MYSQL_PASSWORD: "$MYSQL_ROOT_PASSWORD"
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- nginxnetwork
networks:
nginxnetwork: