forked from phper666/dcnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-sample.yml
144 lines (137 loc) · 3.79 KB
/
docker-compose-sample.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
version: "3"
services:
nginx:
build:
context: nginx
args:
NGINX_VERSION: ${NGINX_VERSION}
ALPINE_REPOSITORIES: ${ALPINE_REPOSITORIES}
ports:
- "${NGINX_HTTP_HOST_PORT}:80"
- "${NGINX_HTTPS_HOST_PORT}:443"
volumes:
- ${CODE_PATH}:/var/www/html/:rw
- ${CONF_PATH}/nginx/conf/conf.d:/etc/nginx/conf.d:rw
- ${CONF_PATH}/nginx/conf/vhost:/etc/nginx/vhost:rw
- ${CONF_PATH}/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro
- ${LOG_PATH}/nginx:/var/log/nginx/:rw
stdin_open: true
tty: true
restart: always
networks:
- dcnmp
php72:
build:
context: php
args:
ALPINE_REPOSITORIES: ${ALPINE_REPOSITORIES}
PHP_VERSION: ${PHP_VERSION}
PHP_EXTENSIONS: ${PHP_EXTENSIONS}
PHP_MORE_EXTENSION_INSTALLER: ${PHP_MORE_EXTENSION_INSTALLER}
PHP_SWOOLE_VERSION: ${PHP_SWOOLE_VERSION}
PHP_SUPERVISORD_INSTALL: ${PHP_SUPERVISORD_INSTALL}
ports:
- "${PHP_HOST_PORT_9000}:9000"
- "${PHP_HOST_PORT_9501}:9501"
- "${PHP_HOST_PORT_18306}:18306"
volumes:
- ${CODE_PATH}:/var/www/html/:rw
- ${CONF_PATH}/php/conf/php.ini:/usr/local/etc/php/php.ini:ro
- ${CONF_PATH}/php/conf/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ${CONF_PATH}/php/conf/supervisord/supervisord.d:/etc/supervisord.d:rw
- ${CONF_PATH}/php/conf/supervisord/supervisord.conf:/etc/supervisord.conf:rw
- ${LOG_PATH}/${PHP_VERSION}:/var/log/php:rw
- ${LOG_PATH}/supervisord:/var/log/supervisord:rw
restart: always
stdin_open: true
tty: true
cap_add:
- SYS_PTRACE
networks:
- dcnmp
mysql:
build:
context: mysql
args:
MYSQL_VERSION: ${MYSQL_VERSION}
ports:
- "${MYSQL_HOST_PORT}:3306"
volumes:
- ${CONF_PATH}/mysql/conf/mysql.cnf:/etc/mysql/conf.d/mysql.cnf:rw
- ${DATA_PATH}/mysql:/var/lib/mysql:rw
- ${LOG_PATH}/mysql:/var/log/mysql:rw
restart: always
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
networks:
- dcnmp
mongodb:
build:
context: mongodb
args:
MONGODB_VERSION: ${MONGODB_VERSION}
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGODB_INITDB_ROOT_USERNAME}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGODB_INITDB_ROOT_PASSWORD}"
volumes:
- ${DATA_PATH}/mongo:/data/db:rw
- ${DATA_PATH}/mongo/mongo_key:/mongo:rw
ports:
- "${MONGODB_HOST_PORT}:27017"
restart: always
stdin_open: true
tty: true
networks:
- dcnmp
command:
--auth
redis:
build:
context: redis
args:
REDIS_VERSION: ${REDIS_VERSION}
ALPINE_REPOSITORIES: ${ALPINE_REPOSITORIES}
ports:
- "${REDIS_HOST_PORT}:6379"
volumes:
- ${CONF_PATH}/redis/conf/redis.conf:/etc/redis.conf:rw
- ${DATA_PATH}/redis:/data:rw
restart: always
stdin_open: true
tty: true
entrypoint: ["redis-server", "/etc/redis.conf"]
networks:
- dcnmp
rabbitmq:
build:
context: rabbitmq
args:
RABBITMQ_VERSION: ${RABBITMQ_VERSION}
ports:
- "${RABBITMQ_HOST_PORT_C}:5672"
- "${RABBITMQ_HOST_PORT_S}:15672"
environment:
- RABBITMQ_DEFAULT_USER="${RABBITMQ_DEFAULT_USER}"
- RABBITMQ_DEFAULT_PASS="${RABBITMQ_DEFAULT_PASS}"
volumes:
- ${LOG_PATH}/rabbitmq:/var/log/rabbitmq:rw
- ${DATA_PATH}/rabbitmq:/var/lib/rabbitmq:rw
stdin_open: true
tty: true
restart: always
networks:
- dcnmp
phpredisadmin:
build:
context: phpredisadmin
args:
REDISMYADMIN_VERSION: ${REDISMYADMIN_VERSION}
ports:
- "${REDISMYADMIN_HOST_PORT}:80"
environment:
- REDIS_1_HOST=redis
- REDIS_1_PORT=6379
networks:
- dcnmp
networks:
dcnmp: