Commit f1d12a92 authored by Mathieu Courcelles's avatar Mathieu Courcelles

Adds missing services directory

parent 465dac0c
Pipeline #8637389 failed with stage
in 1 minute and 29 seconds
# Gunicorn configuration file
import multiprocessing
bind = '0.0.0.0:8000'
workers = multiprocessing.cpu_count() * 2 + 1
reload = False
timeout = 518400
max_requests = 50
loglevel = 'info'
accesslog = '-'
# Run as a less privileged user for security reasons.
user nginx;
# How many worker threads to run;
# "auto" sets it to the number of CPU cores available in the system, and
# offers the best performance. Don't set it higher than the number of CPU
# cores if changing this parameter.
# The maximum number of connections for Nginx is calculated by:
# max_clients = worker_processes * worker_connections
worker_processes auto;
# Maximum open file descriptors per process;
# should be > worker_connections.
worker_rlimit_nofile 8192;
events {
# When you need > 8000 * cpu_cores connections, you start optimizing your OS,
# and this is probably the point at which you hire people who are smarter than
# you, as this is *a lot* of requests.
use epoll;
worker_connections 1024;
multi_accept on;
}
http {
include mime.types;
default_type application/octet-stream;
# Hide nginx version information.
server_tokens off;
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 5;
open_file_cache_errors off;
client_max_body_size 5000M;
proxy_connect_timeout 518400;
proxy_send_timeout 518400;
proxy_read_timeout 518400;
send_timeout 518400;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
# Enable Gzip
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_types text/javascript application/javascript text/css application/json application/xml text/plain;
gzip_static on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
upstream app_server {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response
# for UNIX domain socket setups
#server unix:/usr/src/app/tmp/gunicorn.sock fail_timeout=0;
# for a TCP configuration
server app:8000 fail_timeout=0;
}
server {
# default server
listen 80;
access_log /dev/null;
error_log /dev/null warn;
location / {
return 444;
}
location /alive/ {
proxy_buffers 8 24k;
proxy_buffer_size 2k;
proxy_pass http://app_server;
proxy_set_header Host $http_host;
}
}
server {
listen 80;
server_name HOST_REPLACE nginx;
location /static/ {
alias /usr/src/app/static_root/;
expires 1h;
}
location /media/ {
alias /usr/src/app/media_root/;
expires 1h;
}
location / {
proxy_buffers 8 24k;
proxy_buffer_size 2k;
proxy_pass http://app_server;
proxy_set_header Host $http_host;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment