Skip to content

Commit 15f60b9

Browse files
committed
Re-organize Docker Compose keys
1 parent 457bd9d commit 15f60b9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docker-compose.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ services:
3535
# ------------------------------------------------------------
3636
bind:
3737
image: cytopia/bind:0.15
38+
hostname: bind
3839
restart: always
3940
ports:
4041
# [local-machine:]local-port:docker-port
@@ -85,17 +86,17 @@ services:
8586
docker.for.lin.host.internal: 172.16.238.1
8687
docker.for.lin.localhost: 172.16.238.1
8788

88-
hostname: bind
8989
networks:
9090
app_net:
9191
ipv4_address: 172.16.238.100
9292

9393

9494
# ------------------------------------------------------------
95-
# PHP / HHVM
95+
# PHP
9696
# ------------------------------------------------------------
9797
php:
9898
image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work-0.39
99+
hostname: php
99100

100101
##
101102
## All .env variables
@@ -156,7 +157,6 @@ services:
156157
docker.for.lin.host.internal: 172.16.238.1
157158
docker.for.lin.localhost: 172.16.238.1
158159

159-
hostname: php
160160
networks:
161161
app_net:
162162
ipv4_address: 172.16.238.10
@@ -207,6 +207,7 @@ services:
207207
# ------------------------------------------------------------
208208
httpd:
209209
image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.22
210+
hostname: httpd
210211

211212
environment:
212213

@@ -263,7 +264,6 @@ services:
263264
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD}:80"
264265
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD_SSL}:443"
265266

266-
hostname: httpd
267267
networks:
268268
app_net:
269269
ipv4_address: 172.16.238.11
@@ -300,6 +300,7 @@ services:
300300
# ------------------------------------------------------------
301301
mysql:
302302
image: cytopia/${MYSQL_SERVER:-mariadb-10.1}:latest
303+
hostname: mysql
303304

304305
environment:
305306

@@ -332,7 +333,6 @@ services:
332333
# [local-machine:]local-port:docker-port
333334
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MYSQL}:3306"
334335

335-
hostname: mysql
336336
networks:
337337
app_net:
338338
ipv4_address: 172.16.238.12
@@ -365,6 +365,7 @@ services:
365365
# ------------------------------------------------------------
366366
pgsql:
367367
image: postgres:${PGSQL_SERVER:-9.6}
368+
hostname: pgsql
368369

369370
environment:
370371

@@ -376,7 +377,6 @@ services:
376377
# [local-machine:]local-port:docker-port
377378
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_PGSQL}:5432"
378379

379-
hostname: pgsql
380380
networks:
381381
app_net:
382382
ipv4_address: 172.16.238.13
@@ -402,6 +402,7 @@ services:
402402
# ------------------------------------------------------------
403403
redis:
404404
image: redis:${REDIS_SERVER:-3.2}
405+
hostname: redis
405406

406407
# Apply custom arguments to redis startup
407408
command: redis-server ${REDIS_ARGS:- }
@@ -412,7 +413,6 @@ services:
412413
# [local-machine:]local-port:docker-port
413414
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_REDIS}:6379"
414415

415-
hostname: redis
416416
networks:
417417
app_net:
418418
ipv4_address: 172.16.238.14
@@ -435,12 +435,12 @@ services:
435435
# ------------------------------------------------------------
436436
memcd:
437437
image: memcached:${MEMCD_SERVER:-latest}
438+
hostname: memcd
438439

439440
ports:
440441
# [local-machine:]local-port:docker-port
441442
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MEMCD}:11211"
442443

443-
hostname: memcd
444444
networks:
445445
app_net:
446446
ipv4_address: 172.16.238.15
@@ -463,12 +463,12 @@ services:
463463
# ------------------------------------------------------------
464464
mongo:
465465
image: mongo:${MONGO_SERVER:-latest}
466+
hostname: mongo
466467

467468
ports:
468469
# [local-machine:]local-port:docker-port
469470
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_MONGO}:27017"
470471

471-
hostname: mongo
472472
networks:
473473
app_net:
474474
ipv4_address: 172.16.238.16

0 commit comments

Comments
 (0)