forked from zaporylie/docker-drupal-contribute
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (119 loc) · 4.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
125 lines (119 loc) · 4.41 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
114
115
116
117
118
119
120
121
122
123
124
125
# @file
# This is simple YAML file which will configure for you full LAMP stack, everything
# you need to contribute to Drupal project. You can customize this file in several places
# to specify some personal preferences.
#
# @author
# zaporylie <jakub@piaseccy.pl>
# drupal.org/u/zaporylie
# Data-only container
#
# This is a container without any running process. Will be stooped right after
# creation. As long as you won't delete it, it will hold mysql data for you
# (even if mysql service will be killed).
datamysql:
# We don't want to waist space on your disk so instead of having new, small
# container (like busybox) let's use the same image as we are using for mysql
# deamon.
image: mysql:5.5
# No need to run process so change entry point to echo
entrypoint: /bin/echo
# Display "MySQL data-only container" message if container will be started
command: MySQL data-only container
# Data-only container
#
# This is another container without any process involved. Will hold files in
# strict structure. You can mount more than only one volume but /app is required
# right now if you want to have drupal folder accesible from your host.
datadrupal:
# @see https://registry.hub.docker.com/u/zaporylie/drupal-dev
# @see https://registry.hub.docker.com/u/zaporylie/drupal
image: zaporylie/drupal-dev
# Gets parent folder (for this file) and mount it as /app
volumes:
- ./:/app
# No need to run process so change entry point to echo
entrypoint: /bin/echo
# Display "APP data-only container" message if container will be started
command: APP data-only container
# Blackfire container to profile Drupal extreamly easily.
#
# Container will run blackfire container in deamon mode so it can be linked into
# drupal container.
# See more about blackfire on blackfire.io
#
# If you want to use blackfire profiling tools instead of xdebug - replace value for DEV_MODULE
# variable (in drupal service) to BLACKFIRE
blackfire:
# @see https://registry.hub.docker.com/u/blackfire/blackfire/
image: blackfire/blackfire
# Configure it via env variables. You will find all credits under your blackfire.io profile.
environment:
BLACKFIRE_SERVER_ID: put-id-here
BLACKFIRE_SERVER_TOKEN: put-token-here
# MySQL process container
#
# This container will run mysql deamon for you with data from [datamysql]
# container
mysql:
# Official MySQL docker image, version 5.5 (you can use 5.6, 5.7 as well)
# @see https://registry.hub.docker.com/_/mysql/
image: mysql:5.5
# Define enviromental variables used by this image
environment:
# You can change <secret_password> to something else.
MYSQL_ROOT_PASSWORD: secret_password
# Take all volumes exposed by [datamysql] and mount it here.
volumes_from:
- datamysql
ports:
- "3306"
# Drupal container
#
# This container will run standard apache, php, sshd configuration
drupal:
# apache, php, sshd - all you need (mysql in separate container).
# supervisor takes care to run all services for you. xdebug, codesniffer and
# other usefull tools are alse present!
# @see https://registry.hub.docker.com/u/zaporylie/drupal-dev
# @see https://registry.hub.docker.com/u/zaporylie/drupal
image: zaporylie/drupal-dev
# Mount data from data-only container.
volumes_from:
- datadrupal
# Links to mysql process (via socket).
links:
# First [mysql] is name of deamon container, second <mysql> is required by
# application. If you want to change it, set MYSQL_HOST_NAME as well.
- mysql:mysql
# Link to blackfire container if you want to profile Drupal.
- blackfire:blackfire
environment:
# @see https://registry.hub.docker.com/u/zaporylie/drupal
# @see https://registry.hub.docker.com/u/zaporylie/drupal-dev
DRUPAL_MAJOR_VERSION: 8
DRUPAL_DOWNLOAD_METHOD: git
DRUPAL_GIT_BRANCH: 8.0.x
DRUPAL_GIT_DEPTH: 1
DRUPAL_DB: drupal
DRUPAL_DB_USER: drupal
DRUPAL_DB_PASSWORD: drupal
DRUPAL_PROFILE: standard
DRUPAL_SUBDIR: default
METHOD: auto
MYSQL_HOST_NAME: mysql
# Available values:
# - XDEBUG
# - BLACKFIRE
DEV_MODULE: XDEBUG
#
# NGINX PROXY RELATED VARIABLES
# @see https://github.com/jwilder/nginx-proxy
VIRTUAL_HOST: drupal.dev
# These are ports which will be exposed on docker-compose up and mapped to
# available ports on host. You can lock host port, ex. 22:42222 (ssh will be
# available on port 42222 from outside of container).
ports:
- "80"
- "22"
- "9000"