-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
171 lines (148 loc) · 5.06 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
version: '2'
services:
### Workspace Utilities Container ###########################
workspace:
build:
context: ./${DOCKER_DIRECTORY}/workspace
args:
- INSTALL_XDEBUG
- INSTALL_MONGO
- INSTALL_NODE
- INSTALL_DRUSH
- INSTALL_AEROSPIKE_EXTENSION
- COMPOSER_GLOBAL_INSTALL
- INSTALL_WORKSPACE_SSH
- PUID=1000
- PGID=1000
- NODE_VERSION
volumes_from:
- volumes_source
extra_hosts:
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
- "dockerhost:10.200.10.1"
ports:
- "${SSH_PORT}:22"
tty: true
### PHP-FPM Container #######################################
php-fpm:
build:
context: ./${DOCKER_DIRECTORY}/php-fpm
args:
- INSTALL_XDEBUG
- INSTALL_MONGO
- INSTALL_ZIP_ARCHIVE
- INSTALL_MEMCACHED
- INSTALL_OPCACHE
- INSTALL_AEROSPIKE_EXTENSION
- INSTALL_GEM_AND_SASS
dockerfile: ${PHP_DOCKERFILE}
volumes_from:
- volumes_source
expose:
- "9000"
links:
- workspace
extra_hosts:
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
- "dockerhost:10.200.10.1"
environment:
# IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
- PHP_IDE_CONFIG="serverName=laravel"
### Apache Server Container ##################################
apache2:
build:
context: ./${DOCKER_DIRECTORY}/apache2
args:
- PHP_SOCKET=php-fpm:9000
- PROJECT_SUBDIRECTORY
volumes_from:
- volumes_source
volumes:
- ./${DOCKER_DIRECTORY}/logs/apache2:/var/log/apache2
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
links:
- php-fpm
### MySQL Container #########################################
mysql:
build: ./${DOCKER_DIRECTORY}/mysql
volumes_from:
- volumes_data
ports:
- "${MYSQL_PORT}:3306"
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
### MongoDB Container #######################################
mongo:
build:
context: ./${DOCKER_DIRECTORY}/mongo
dockerfile: ${MONGODB_DOCKERFILE}
ports:
- "${MONGODB_PORT}:27017"
volumes_from:
- volumes_data
### CouchDB Container #######################################
couchdb:
build:
context: ./${DOCKER_DIRECTORY}/couchdb
args:
- CONF_COUCHDB_USER
- CONF_COUCHDB_PASSWORD
ports:
- "${CONF_COUCHDB_PORT}:5984"
volumes_from:
- volumes_data
### Memcached Container #####################################
memcached:
build: ./${DOCKER_DIRECTORY}/memcached
volumes_from:
- volumes_data
ports:
- "11211:11211"
links:
- php-fpm
### phpMyAdmin Container ##################################
phpmyadmin:
build: ./${DOCKER_DIRECTORY}/phpmyadmin
environment:
PMA_ARBITRARY: 1
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes_from:
- volumes_data
ports:
- "${PHPMYADMIN_PORT}:80"
links:
# for mysql container
- "mysql:db"
# for mariadb container
# - "mariadb:db"
### Application Code Container ######################
volumes_source:
image: tianon/true
volumes:
- ./${PROJECT_DIRECTORY}:/var/www/
# Demonstration of how to mount multiple sites
# - ../../site_a/:/var/www/site_a
# - ../../site_b/:/var/www/site_b
### Databases Data Container ################################
volumes_data:
image: tianon/true
volumes:
- ./${DOCKER_DATA_DIRECTORY}/mysql:/var/lib/mysql
- ./${DOCKER_DATA_DIRECTORY}/memcached:/var/lib/memcached
- ./${DOCKER_DATA_DIRECTORY}/mongo:/data/db
- ./${DOCKER_DATA_DIRECTORY}/sessions:/sessions
- ./${DOCKER_DATA_DIRECTORY}/couchdb:/opt/couchdb/data
# - ./data/postgres:/var/lib/postgresql/data
# - ./data/redis:/data
# - ./data/neo4j:/var/lib/neo4j/data
# - ./data/aerospike:/opt/aerospike/data
# - ./data/caddy:/root/.caddy
# - ./data/elasticsearch/data:/usr/share/elasticsearch/data
### Add more Containers below ###############################