File tree Expand file tree Collapse file tree 1 file changed +39
-10
lines changed
Expand file tree Collapse file tree 1 file changed +39
-10
lines changed Original file line number Diff line number Diff line change 1- version : ' 3'
1+ version : ' 3.7 '
22
33services :
4- fpm :
4+ FPM :
55 hostname : docker-php-fpm
66 build :
77 context : ./Dockerfiles/php-fpm
@@ -12,15 +12,24 @@ services:
1212 - ./:/var/www
1313 - ./Dockerfiles/php-fpm/php.ini:/usr/local/etc/php/php.ini
1414 - ./Dockerfiles/php-fpm/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
15- restart : on-failure
15+ deploy :
16+ resources :
17+ limits :
18+ cpus : ' 0.50'
19+ memory : 512M
20+ reservations :
21+ cpus : ' 0.25'
22+ memory : 128M
23+ restart_policy :
24+ condition : on-failure
1625 extra_hosts :
1726 - " localhost:172.16.1.50"
1827 # - "any-your-project-domain:172.16.1.50"
1928 networks :
2029 app_net :
2130 ipv4_address : 172.16.1.40
2231
23- mysql :
32+ MYSQL :
2433 hostname : docker-mysql
2534 image : mysql:5.7
2635 ports :
@@ -33,11 +42,20 @@ services:
3342 MYSQL_USER : developer
3443 MYSQL_PASSWORD : password
3544 command : mysqld --sql_mode="" --character-set-server=utf8 --init-connect='SET NAMES UTF8;'
36- restart : on-failure
45+ deploy :
46+ resources :
47+ limits :
48+ cpus : ' 0.50'
49+ memory : 512M
50+ reservations :
51+ cpus : ' 0.25'
52+ memory : 256M
53+ restart_policy :
54+ condition : on-failure
3755 networks :
3856 - app_net
3957
40- nginx :
58+ NGINX :
4159 hostname : docker-nginx
4260 build :
4361 context : ./Dockerfiles/nginx
@@ -50,13 +68,22 @@ services:
5068 - ./Logs:/var/log/nginx
5169 - ./Dockerfiles/nginx/sites-enabled:/etc/nginx/sites-enabled
5270 depends_on :
53- - fpm
54- restart : on-failure
71+ - FPM
72+ deploy :
73+ resources :
74+ limits :
75+ cpus : ' 0.10'
76+ memory : 30M
77+ reservations :
78+ cpus : ' 0.05'
79+ memory : 10M
80+ restart_policy :
81+ condition : on-failure
5582 networks :
5683 app_net :
5784 ipv4_address : 172.16.1.50
5885
59- workspace :
86+ WORKSPACE :
6087 hostname : docker-workspace
6188 build :
6289 context : ./Dockerfiles/workspace
@@ -66,7 +93,9 @@ services:
6693 volumes :
6794 - ./:/var/www
6895 depends_on :
69- - fpm
96+ - FPM
97+ - MYSQL
98+ - MEMCACHED
7099 restart : on-failure
71100 extra_hosts :
72101 - " localhost:172.16.1.50"
You can’t perform that action at this time.
0 commit comments