-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
50 lines (48 loc) · 1.43 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
services:
mysql:
image: library/mysql:5.7.32
container_name: "$MYSQL_CONTAINER_NAME"
command: "--sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' --default_authentication_plugin=mysql_native_password --character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci"
restart: always
environment:
MYSQL_ROOT_PASSWORD: "$MYSQL_ROOT_PASSWORD"
MYSQL_DATABASE: "$MYSQL_DATABASE"
MYSQL_USER: "$MYSQL_USER"
MYSQL_PASSWORD: "$MYSQL_PASSWORD"
ports:
- '3306:3306'
networks:
dev-local-network:
ipv4_address: 10.6.1.2
volumes:
- dev_mysql_volume:/var/lib/mysql
php-apache:
build:
context: .docker/php-apache/
dockerfile: Dockerfile
container_name: dev_php_apache
restart: always
ports:
- 81:80
volumes:
- .docker/config/vhosts:/etc/apache2/sites-enabled
- ${APP_DIR}:/home/site/wwwroot
- .docker/config/mods-available/mpm_prefork.conf:/etc/apache2/mods-available/mpm_prefork.conf
depends_on:
- mysql
networks:
dev-local-network:
ipv4_address: 10.6.1.3
# Name our volumes
volumes:
dev_mysql_volume:
driver: local
# Local virtual network
networks:
dev-local-network:
driver: bridge
driver_opts:
com.docker.network.bridge.name: "local-bridge"
ipam:
config:
- subnet: 10.6.1.0/16