Skip to content

Commit 2819985

Browse files
committedOct 15, 2017
Implement external volumes
Fixes #67
1 parent bbcd24a commit 2819985

4 files changed

+57
-78
lines changed
 

‎docker-compose.development-reverse-proxy.yml

+19-26
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ services:
2323
volumes:
2424
- ./app/:/app/
2525
- ./:/docker/
26-
volumes_from:
27-
- storage
2826
# cap and privileged needed for slowlog
2927
cap_add:
3028
- SYS_PTRACE
@@ -54,8 +52,8 @@ services:
5452
#dockerfile: Percona-5.7.Dockerfile
5553
#ports:
5654
# - 13306:3306
57-
volumes_from:
58-
- storage
55+
volumes:
56+
- mysql:/var/lib/mysql
5957
env_file:
6058
- etc/environment.yml
6159
- etc/environment.development.yml
@@ -70,8 +68,8 @@ services:
7068
# dockerfile: Postgres-9.5.Dockerfile
7169
# ports:
7270
# - 15432:5432
73-
# volumes_from:
74-
# - storage
71+
# volumes:
72+
# - postgres:/var/lib/postgresql/data
7573
# env_file:
7674
# - etc/environment.yml
7775
# - etc/environment.development.yml
@@ -82,13 +80,13 @@ services:
8280
#solr:
8381
# build:
8482
# context: docker/solr/
85-
# volumes_from:
86-
# - storage
83+
# volumes:
84+
# - solr:/opt/solr/server/solr/data
8785
# env_file:
8886
# - etc/environment.yml
8987
# - etc/environment.development.yml
9088
# environment:
91-
# - SOLR_STORAGE=/storage/solr/server-master/
89+
# - SOLR_STORAGE=/opt/solr/server/solr/data
9290
# - VIRTUAL_HOST=solr.boilerplate.docker
9391
# - VIRTUAL_PORT=8983
9492

@@ -101,8 +99,8 @@ services:
10199
# ports:
102100
# - 19200:9200
103101
# - 19300:9300
104-
# volumes_from:
105-
# - storage
102+
# volumes:
103+
# - elasticsearch:/usr/share/elasticsearch/data
106104
# env_file:
107105
# - etc/environment.yml
108106
# - etc/environment.development.yml
@@ -116,8 +114,8 @@ services:
116114
#redis:
117115
# build:
118116
# context: docker/redis/
119-
# volumes_from:
120-
# - storage
117+
# volumes:
118+
# - redis:/data
121119
# env_file:
122120
# - etc/environment.yml
123121
# - etc/environment.development.yml
@@ -128,8 +126,6 @@ services:
128126
#memcached:
129127
# build:
130128
# context: docker/memcached/
131-
# volumes_from:
132-
# - storage
133129
# env_file:
134130
# - etc/environment.yml
135131
# - etc/environment.development.yml
@@ -167,8 +163,6 @@ services:
167163
#ftp:
168164
# build:
169165
# context: docker/vsftpd/
170-
# volumes_from:
171-
# - storage
172166
# volumes:
173167
# - ./:/application/
174168
# env_file:
@@ -187,13 +181,12 @@ services:
187181
# - VIRTUAL_HOST=pma.boilerplate.docker
188182
# - VIRTUAL_PORT=80
189183
# volumes:
190-
# - /sessions
184+
# - phpmyadmin:/sessions
191185

192-
#######################################
193-
# Storage
194-
#######################################
195-
storage:
196-
build:
197-
context: docker/storage/
198-
volumes:
199-
- /storage
186+
volumes:
187+
mysql:
188+
postgres:
189+
solr:
190+
elasticsearch:
191+
redis:
192+
phpmyadmin:

‎docker-compose.development.yml

+19-26
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ services:
2323
volumes:
2424
- ./app/:/app/
2525
- ./:/docker/
26-
volumes_from:
27-
- storage
2826
# cap and privileged needed for slowlog
2927
cap_add:
3028
- SYS_PTRACE
@@ -54,8 +52,8 @@ services:
5452
#dockerfile: Percona-5.7.Dockerfile
5553
ports:
5654
- 13306:3306
57-
volumes_from:
58-
- storage
55+
volumes:
56+
- mysql:/var/lib/mysql
5957
env_file:
6058
- etc/environment.yml
6159
- etc/environment.development.yml
@@ -70,8 +68,8 @@ services:
7068
# dockerfile: Postgres-9.5.Dockerfile
7169
# ports:
7270
# - 15432:5432
73-
# volumes_from:
74-
# - storage
71+
# volumes:
72+
# - postgres:/var/lib/postgresql/data
7573
# env_file:
7674
# - etc/environment.yml
7775
# - etc/environment.development.yml
@@ -82,13 +80,13 @@ services:
8280
#solr:
8381
# build:
8482
# context: docker/solr/
85-
# volumes_from:
86-
# - storage
83+
# volumes:
84+
# - solr:/opt/solr/server/solr/data
8785
# env_file:
8886
# - etc/environment.yml
8987
# - etc/environment.development.yml
9088
# environment:
91-
# - SOLR_STORAGE=/storage/solr/server-master/
89+
# - SOLR_STORAGE=/opt/solr/server/solr/data
9290
# - VIRTUAL_HOST=solr.boilerplate.docker
9391
# - VIRTUAL_PORT=8983
9492

@@ -110,8 +108,8 @@ services:
110108
# ports:
111109
# - 19200:9200
112110
# - 19300:9300
113-
# volumes_from:
114-
# - storage
111+
# volumes:
112+
# - elasticsearch:/usr/share/elasticsearch/data
115113
# env_file:
116114
# - etc/environment.yml
117115
# - etc/environment.development.yml
@@ -125,8 +123,8 @@ services:
125123
#redis:
126124
# build:
127125
# context: docker/redis/
128-
# volumes_from:
129-
# - storage
126+
# volumes:
127+
# - redis:/data
130128
# env_file:
131129
# - etc/environment.yml
132130
# - etc/environment.development.yml
@@ -137,8 +135,6 @@ services:
137135
#memcached:
138136
# build:
139137
# context: docker/memcached/
140-
# volumes_from:
141-
# - storage
142138
# env_file:
143139
# - etc/environment.yml
144140
# - etc/environment.development.yml
@@ -176,8 +172,6 @@ services:
176172
#ftp:
177173
# build:
178174
# context: docker/vsftpd/
179-
# volumes_from:
180-
# - storage
181175
# volumes:
182176
# - ./:/application/
183177
# env_file:
@@ -196,13 +190,12 @@ services:
196190
# - VIRTUAL_HOST=pma.boilerplate.docker
197191
# - VIRTUAL_PORT=80
198192
# volumes:
199-
# - /sessions
193+
# - phpmyadmin:/sessions
200194

201-
#######################################
202-
# Storage
203-
#######################################
204-
storage:
205-
build:
206-
context: docker/storage/
207-
volumes:
208-
- /storage
195+
volumes:
196+
mysql:
197+
postgres:
198+
solr:
199+
elasticsearch:
200+
redis:
201+
phpmyadmin:

‎docker-compose.production.yml

+18-25
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ services:
2222
- "10022:22"
2323
volumes:
2424
- ./app/:/app/
25-
volumes_from:
26-
- storage
2725
env_file:
2826
- etc/environment.yml
2927
- etc/environment.production.yml
@@ -42,8 +40,8 @@ services:
4240
#dockerfile: Percona-5.5.Dockerfile
4341
#dockerfile: Percona-5.6.Dockerfile
4442
#dockerfile: Percona-5.7.Dockerfile
45-
volumes_from:
46-
- storage
43+
volumes:
44+
- mysql:/var/lib/mysql
4745
env_file:
4846
- etc/environment.yml
4947
- etc/environment.production.yml
@@ -58,8 +56,8 @@ services:
5856
# dockerfile: Postgres-9.5.Dockerfile
5957
# ports:
6058
# - 15432:5432
61-
# volumes_from:
62-
# - storage
59+
# volumes:
60+
# - solr:/opt/solr/server/solr/data
6361
# env_file:
6462
# - etc/environment.yml
6563
# - etc/environment.production.yml
@@ -72,10 +70,10 @@ services:
7270
# context: docker/solr/
7371
# ports:
7472
# - 18983:8983
75-
# volumes_from:
76-
# - storage
73+
# volumes:
74+
# - solr:/opt/solr/server/solr/data
7775
# environment:
78-
# - SOLR_STORAGE=/storage/solr/server-master/
76+
# - SOLR_STORAGE=/opt/solr/server/solr/data
7977
# env_file:
8078
# - etc/environment.yml
8179
# - etc/environment.production.yml
@@ -89,8 +87,8 @@ services:
8987
# ports:
9088
# - 19200:9200
9189
# - 19300:9300
92-
# volumes_from:
93-
# - storage
90+
# volumes:
91+
# - elasticsearch:/usr/share/elasticsearch/data
9492
# env_file:
9593
# - etc/environment.yml
9694
# - etc/environment.production.yml
@@ -101,8 +99,8 @@ services:
10199
#redis:
102100
# build:
103101
# context: docker/redis/
104-
# volumes_from:
105-
# - storage
102+
# volumes:
103+
# - redis:/data
106104
# env_file:
107105
# - etc/environment.yml
108106
# - etc/environment.production.yml
@@ -113,8 +111,6 @@ services:
113111
#memcached:
114112
# build:
115113
# context: docker/memcached/
116-
# volumes_from:
117-
# - storage
118114
# env_file:
119115
# - etc/environment.yml
120116
# - etc/environment.production.yml
@@ -125,19 +121,16 @@ services:
125121
#ftp:
126122
# build:
127123
# context: docker/vsftp/
128-
# volumes_from:
129-
# - storage
130124
# volumes:
131125
# - ./:/application/
132126
# env_file:
133127
# - etc/environment.yml
134128
# - etc/environment.production.yml
135129

136-
#######################################
137-
# Storage
138-
#######################################
139-
storage:
140-
build:
141-
context: docker/storage/
142-
volumes:
143-
- /storage
130+
volumes:
131+
mysql:
132+
postgres:
133+
solr:
134+
elasticsearch:
135+
redis:
136+
phpmyadmin:

‎docker/solr/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN mv /tmp/solr-typo3-plugin.jar /opt/solr/example/solr/typo3lib/ \
3131
# Fix rights
3232
RUN chown solr:solr -R /opt/solr/example/solr/
3333

34-
VOLUME "/storage"
34+
VOLUME "/opt/solr/server/solr/data"
3535

3636
ENTRYPOINT ["/entrypoint.sh"]
3737
CMD ["solr"]

0 commit comments

Comments
 (0)
Please sign in to comment.