-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (45 loc) · 927 Bytes
/
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
version: '2'
services:
nginx:
build: docker/nginx
ports:
- 8080:80
volumes_from:
- app
app:
command: "true"
image: alpine:3.4
volumes:
- .:/var/www/app
php:
build: docker/php
environment:
docker: "true"
expose:
- 9000
volumes:
- composer-cache:/composer/cache
volumes_from:
- app
depends_on:
- mysql
links:
- mysql
extra_hosts:
- "host.docker.internal:host-gateway"
mysql:
image: mariadb:10.5.17
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- mysql-data:/var/lib/mysql
- ./scripts/schema.sql:/docker-entrypoint-initdb.d/1.sql
- ./scripts/data.sql:/docker-entrypoint-initdb.d/2.sql
ports:
- "3306:3306"
volumes:
composer-cache:
driver: local
mysql-data: