forked from drupal-composer/drupal-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (63 loc) · 1.72 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
57
58
59
60
61
62
63
64
65
66
67
68
version: '2'
volumes:
db-volume:
services:
# DB container
db:
image: mariadb
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_DATABASE=drupal
- MYSQL_USER=drupal
- MYSQL_PASSWORD=drupal
volumes:
- db-volume:/var/lib/mysql
# Container to run cli applications (composer, drush, etc.)
php-cli:
build:
context: .
dockerfile: Dockerfile-php-cli
args:
USER_UID: ${USER_UID}
volumes:
- .:/var/www/html
# Share the local user's composer cache as a Docker volume
- ~/.composer/cache:/home/php/.composer/cache:rw
# Share the local user's terminus cache as a Docker volume
- ~/.terminus/cache:/home/php/.terminus/cache:rw
# Share the local user's npm cache as a Docker volume
- ~/.npm:/home/php/.npm:rw
# Share the local user's SSH keys and configuration (read-only, except known_hosts)
- ~/.ssh:/home/php/.ssh:ro
- ~/.ssh/known_hosts:/home/php/.ssh/known_hosts:rw
environment:
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/www/html/vendor/bin
- MYSQL_DATABASE=drupal
- MYSQL_USER=drupal
- MYSQL_PASSWORD=drupal
- SIMPLETEST_DB
- SIMPLETEST_BASE_URL
links:
- db
# Container used as PHP runtime for the web server
php-fpm:
image: drupaldocker/php-dev:7-fpm
volumes:
- .:/var/www/html
environment:
- MYSQL_DATABASE=drupal
- MYSQL_USER=drupal
- MYSQL_PASSWORD=drupal
links:
- db
# Container used as web server
web:
image: drupaldocker/nginx
environment:
DOCROOT: /var/www/html/web
ports:
- ${PORT}:80
volumes:
- .:/var/www/html
links:
- php-fpm:php