-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
113 lines (101 loc) · 3.45 KB
/
docker-compose.yml
File metadata and controls
113 lines (101 loc) · 3.45 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: '2'
services:
##########################
### REACTJS ##############
##########################
frontend:
image: node:8-alpine
working_dir: /app
labels:
- 'traefik.backend=node'
- 'traefik.port=3000'
- 'traefik.frontend.rule=Host:app.docker.localhost'
expose:
- "3000"
volumes:
- ./reactjs:/app
# By default we tell Docker to copy files inside of ./node_modules
# folder from Docker container into the host machine.
# However if you're experiencing performance issues,
# feel free to uncomment the line below.
# - /app/node_modules
command: sh -c 'npm install && npm run start'
##########################
### DRUPAL ###############
##########################
# Here we use almost out of the box docker4drupal configuration.
# So you can refer to their documentation for configuration.
# You can add more containers for memcached, redis, varnish, solr, etc
# using pre-built docker images.
# https://github.com/wodby/docker4drupal/blob/master/docker-compose.yml
backend_php:
image: wodby/drupal-php:8-1.13
# image: wodby/drupal-php:7.0-2.0.0
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S backend_mailhog:1025
# PHP_XDEBUG: 1
# PHP_XDEBUG_DEFAULT_ENABLE: 1
# PHP_XDEBUG_REMOTE_CONNECT_BACK: 0 # This is needed to respect remote.host setting bellow
# PHP_XDEBUG_REMOTE_HOST: "10.254.254.254" # You will also need to 'sudo ifconfig lo0 alias 10.254.254.254'
volumes:
- ./drupal:/var/www/html
# - d4d-unison-sync:/var/www/html:rw # Replace volume to this to use docker-sync for macOS users
backend_mariadb:
image: wodby/mariadb:10.1-2.0.0
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci # The simple way to override the mariadb config.
# volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
# - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually.
backend_nginx:
image: wodby/drupal-nginx:8-1.10-2.0.0
restart: unless-stopped
depends_on:
- backend_php
environment:
NGINX_BACKEND_HOST: backend_php
NGINX_SERVER_ROOT: /var/www/html/web
volumes:
- ./drupal:/var/www/html
labels:
- 'traefik.backend=nginx'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:drupal.docker.localhost'
backend_pma:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: backend_mariadb
PMA_USER: drupal
PMA_PASSWORD: drupal
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
labels:
- 'traefik.backend=pma'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:pma.drupal.docker.localhost'
backend_mailhog:
image: mailhog/mailhog
labels:
- 'traefik.backend=mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:mailhog.drupal.docker.localhost'
##########################
### REVERSE PROXY ########
##########################
traefik:
image: traefik
restart: unless-stopped
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '8000:80'
- '8080:8080'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# Docker-sync for macOS users
#volumes:
# d4d-unison-sync:
# external: true