-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (65 loc) · 1.98 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
69
70
71
version: "2"
services:
# Pure web-server, hands php-requests off to fpm.
web:
image: reload/drupal-apache-fpm
ports:
- '80'
working_dir: /var/www/web
volumes_from:
- webroot
links:
- fpm
# Instance of the php-image configured to serve fpm-requests.
fpm:
image: reload/drupal-php7-fpm:7.1
ports:
- '9000'
volumes_from:
- webroot
volumes:
- 'cache:/composer-cache'
working_dir: /var/www/web
links:
- db
environment:
COMPOSER_CACHE_DIR: '/composer-cache/composer'
PATH: '/var/www/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PHP_SENDMAIL_PATH: /usr/local/bin/mhsendmail --smtp-addr="mailhog:1025"
db:
image: mariadb:10
ports:
- '3306'
volumes:
- './docker/db/initdb.d:/docker-entrypoint-initdb.d'
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: db
MYSQL_USER: db
MYSQL_PASSWORD: db
npm:
# image: node:argon
build: docker/npm-image
volumes_from:
- webroot
volumes:
- 'cache:/npm-cache'
working_dir: /var/www/web
environment:
PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
npm_config_cache: '/npm-cache/node'
entrypoint: "/bin/sh -c 'cd /var/www/web/themes/forlev2016 && npm run build && npm run watch'"
# user: node
# Webroot and volumned paths needs to be accessible from multiple containers so
# we set up all paths once and for all via a single volumne-container.
webroot:
image: tianon/true
volumes:
- './:/var/www'
- './docker/docker.settings.php:/var/www/web/sites/default/settings.php'
- './docker/docker.settings.local.php:/var/www/web/sites/default/settings.local.php'
- './docker/docker.services.yml:/var/www/web/sites/default/services.yml'
- './docker/docker.development.services.yml:/var/www/web/sites/development.services.yml'
volumes:
# NPM cache that survives docker-reset.sh
cache: