-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·161 lines (159 loc) · 3.86 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
version: '2'
# Network.
networks:
prodnetwork:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "true"
com.docker.network.bridge.enable_ip_masquerade: "false"
ipam:
driver: default
config:
- subnet: 172.95.59.0/24
gateway: 172.95.59.1
# aux_addresses:
# centos_setup_application: 172.95.59.2
# centos_setup_web_server: 172.95.59.3
# centos_setup_search: 172.95.59.4
# centos_setup_cache: 172.95.59.5
# centos_setup_database: 172.95.59.6
# centos_setup_mail: 172.95.59.7
# Services.
services:
# Application
centos_setup_application:
build: ./containers/application
restart: always
# command: bash /var/application/bootstrap.sh
networks:
prodnetwork :
ipv4_address: 172.95.59.2
# links:
# - centos_setup_mail:centos_setup_mail
environment:
container: docker
# ports:
# # Apache.
# - "280:80"
# expose:
# - "80"
depends_on:
- centos_setup_mail
volumes:
- ./containers/application:/var/application
- ./containers/application/html:/var/www/html
container_name: centos_setup_application
# Application
centos_setup_web_server:
build: ./containers/web_server
restart: always
# command: bash /var/web_server/bootstrap.sh
networks:
prodnetwork :
ipv4_address: 172.95.59.3
environment:
container: docker
ports:
# Apache.
- "280:80"
- "28080:8080"
expose:
- "80"
- "8080"
depends_on:
- centos_setup_mail
- centos_setup_application
volumes:
- ./containers/web_server:/var/web_server
- ./containers/application/html:/var/www/html
container_name: centos_setup_web_server
# Search
centos_setup_search:
build: ./containers/search
restart: always
# command: bash /var/search/bootstrap.sh
networks:
prodnetwork :
ipv4_address: 172.95.59.4
environment:
container: docker
ports:
# SOLR.
- "18983:8983"
depends_on:
- centos_setup_application
expose:
- "8983"
#depends_on:
volumes:
- ./containers/search:/var/search
- ./containers/application/html:/var/www/html
container_name: centos_setup_search
# Cache
centos_setup_cache:
build: ./containers/cache
restart: always
# command: bash /var/cache/bootstrap.sh
networks:
prodnetwork :
ipv4_address: 172.95.59.5
environment:
container: docker
ports:
# Varnish.
- "180:80"
# Memcached.
- "11211:11211"
expose:
- "80"
- "11211"
#depends_on:
volumes:
- ./containers/cache:/var/cache
- ./containers/application/html:/var/www/html
container_name: centos_setup_cache
# Database
centos_setup_database:
build: ./containers/database
restart: always
# command: bash /var/database/bootstrap.sh
networks:
prodnetwork :
ipv4_address: 172.95.59.6
environment:
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: centos_setup_database
container: docker
ports:
# MySQL.
- "13306:3306"
expose:
- "3306"
#depends_on:
volumes:
- /var/lib/mysql
- ./containers/database:/var/database
- ./containers/application/html:/var/www/html
container_name: centos_setup_database
# Mail
centos_setup_mail:
build: ./containers/mail
restart: always
# command: bash /var/mail/bootstrap.sh
#ports:
networks:
prodnetwork :
ipv4_address: 172.95.59.7
environment:
container: docker
ports:
- "225:25"
expose:
- "25"
#depends_on:
volumes:
- ./containers/mail:/var/mail
- ./containers/application/html:/var/www/html
container_name: centos_setup_mail