Optimize stack

This commit is contained in:
schmelczerandras 2020-08-23 15:40:51 +02:00
parent fe02158cd7
commit dd3eda64f4
2 changed files with 6 additions and 10 deletions

View file

@ -7,14 +7,14 @@ services:
networks:
- network
deploy:
replicas: 2
replicas: 3
resources:
limits:
cpus: "0.5"
memory: 32M
# no cpu limit
memory: 16M
reservations:
cpus: "0.2"
memory: 32M
memory: 16M
placement:
max_replicas_per_node: 1
update_config:

View file

@ -2,6 +2,8 @@ user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
access_log off;
pid /var/run/nginx.pid;
events {
@ -13,12 +15,6 @@ http {
include /etc/nginx/mime.types;
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_max_chunk 1m;
tcp_nopush on;