Optimize stack
This commit is contained in:
parent
fe02158cd7
commit
dd3eda64f4
2 changed files with 6 additions and 10 deletions
|
|
@ -7,14 +7,14 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- network
|
- network
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 2
|
replicas: 3
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpus: "0.5"
|
# no cpu limit
|
||||||
memory: 32M
|
memory: 16M
|
||||||
reservations:
|
reservations:
|
||||||
cpus: "0.2"
|
cpus: "0.2"
|
||||||
memory: 32M
|
memory: 16M
|
||||||
placement:
|
placement:
|
||||||
max_replicas_per_node: 1
|
max_replicas_per_node: 1
|
||||||
update_config:
|
update_config:
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ user nginx;
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
|
|
||||||
error_log /var/log/nginx/error.log warn;
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
access_log off;
|
||||||
|
|
||||||
pid /var/run/nginx.pid;
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
|
|
@ -13,12 +15,6 @@ http {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
|
||||||
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
sendfile_max_chunk 1m;
|
sendfile_max_chunk 1m;
|
||||||
tcp_nopush on;
|
tcp_nopush on;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue