forked from twitf/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
148 lines (139 loc) · 3.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
version: '3'
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
mysql:
driver: local
redis:
driver: local
phpmyadmin:
driver: local
elasticsearch:
driver: local
services:
### PHP-FPM ##############################################
php-fpm:
env_file: ./.env
build:
context: ./php-fpm
args:
- PHP_VERSION=${PHP_VERSION}
volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ../:/var/www
expose:
- "9000"
ports:
- "22:22"
- "9501:9501"
- "9502:9502"
- "9503:9503"
extra_hosts:
- "dockerhost:10.0.75.0"
environment:
- PHP_IDE_CONFIG=serverName=twitf
networks:
- backend
container_name: php${PHP_VERSION}-fpm
### NGINX Server #########################################
nginx:
build:
context: ./nginx
volumes:
- ../:/var/www
- ./logs/nginx:/var/log/nginx
- ./nginx/sites/:/etc/nginx/sites-available
- ./nginx/ssl/:/etc/nginx/ssl
ports:
- "80:80"
- "443:443"
depends_on:
- php-fpm
networks:
- frontend
- backend
container_name: nginx
### MySQL ################################################
mysql:
build:
context: ./mysql
environment:
- MYSQL_DATABASE=default
- MYSQL_USER=twitf
- MYSQL_PASSWORD=twitf
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./data/mysql:/var/lib/mysql
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports:
- "3306:3306"
networks:
- backend
container_name: mysql
### Redis ################################################
redis:
build: ./redis
volumes:
- ./data/redis:/data
ports:
- "6379:6379"
networks:
- backend
container_name: redis
### phpMyAdmin ###########################################
phpmyadmin:
build: ./phpmyadmin
environment:
- PMA_ARBITRARY=1
- MYSQL_USER=default
- MYSQL_PASSWORD=twitf
- MYSQL_ROOT_PASSWORD=root
ports:
- "8080:80"
depends_on:
- "mysql"
networks:
- frontend
- backend
container_name: phpmyadmin
### ElasticSearch ########################################
elasticsearch:
build: ./elasticsearch
volumes:
- elasticsearch:/usr/share/elasticsearch/data
environment:
- cluster.name=twitf-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9200:9200"
- "9300:9300"
depends_on:
- php-fpm
networks:
- frontend
- backend
container_name: elasticSearch
### RabbitMQ ########################################
rabbitmq:
build: ./rabbitmq
ports:
- "5672:5672"
- "15672:15672"
- "15671:15671"
privileged: true
environment:
- RABBITMQ_DEFAULT_USER=root
- RABBITMQ_DEFAULT_PASS=root
depends_on:
- php-fpm
networks:
- backend
container_name: rabbitmq