-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
124 lines (124 loc) · 2.74 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
version: "3"
services:
nginx:
image: nginx
container_name: nginx
sysctls:
net.core.somaxconn: "65535"
net.ipv4.tcp_syncookies: 0
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
restart: unless-stopped
depends_on:
- php
volumes:
- ./project:/www #папка с проектом
#- ./docker/nginx/conf.d:/etc/nginx/conf.d # - advanced
- ./docker/nginx/conf.dbasic:/etc/nginx/conf.d # - basic
ports:
- 80:80
- 8080:8080
- 443:443
networks:
web:
ipv4_address: 172.18.33.4
php:
build:
#context: ./docker/php/build/7.0
context: ./docker/php/build/7.1
#context: ./docker/php/build/5.6
container_name: php
sysctls:
net.core.somaxconn: "65535"
net.ipv4.tcp_syncookies: 0
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
restart: unless-stopped
volumes:
- ./project:/www #папка с проектом
- ./docker/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
- ./docker/php/ini/zcustom.ini:/usr/local/etc/php/conf.d/zcustom.ini
working_dir: /www/
ports:
- 9000:9000
- 25:25
- 110:110
networks:
web:
ipv4_address: 172.18.33.5
mysql:
image: mysql:5.7
container_name: mysql
sysctls:
net.core.somaxconn: "65535"
net.ipv4.tcp_syncookies: 0
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
restart: unless-stopped
volumes:
- ./db/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: 12345
MYSQL_DATABASE: test
command: mysqld --sql_mode=""
ports:
- 3306:3306
networks:
web:
ipv4_address: 172.18.33.2
redis:
image: redis:3.0
container_name: redis
sysctls:
net.core.somaxconn: "65535"
net.ipv4.tcp_syncookies: 0
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
restart: unless-stopped
volumes:
- ./docker/redis:/usr/local/etc/redis
ports:
- 6379:6379
networks:
web:
ipv4_address: 172.18.33.3
command: 'redis-server /usr/local/etc/redis/redis.conf'
# mongo:
# container_name: mongo
# sysctls:
# net.core.somaxconn: "65535"
# net.ipv4.tcp_syncookies: 0
# ulimits:
# nproc: 65535
# nofile:
# soft: 20000
# hard: 40000
# restart: unless-stopped
# build:
# context: ./docker/mongo/build/3.4
# ports:
# - 27017:27017
# volumes:
# - ./db/mongodb:/data/db
# networks:
# web:
# ipv4_address: 172.18.33.6
networks:
web:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.18.33.0/24