2017-11-01 16:29:02 -07:00
|
|
|
upstream worker {
|
|
|
|
server ytdl:5002;
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream backend {
|
|
|
|
server app:5001;
|
|
|
|
}
|
|
|
|
|
2017-10-24 16:57:59 -07:00
|
|
|
server {
|
2017-11-21 22:41:55 -08:00
|
|
|
listen 80;
|
|
|
|
listen 443 ssl;
|
|
|
|
|
|
|
|
root /usr/share/nginx/html;
|
2018-07-05 23:17:00 -07:00
|
|
|
server_name podsync.net;
|
2017-11-21 22:41:55 -08:00
|
|
|
|
2018-07-05 23:17:00 -07:00
|
|
|
location ^~ /.well-known/acme-challenge {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
default_type text/plain;
|
|
|
|
allow all;
|
|
|
|
}
|
2017-10-24 16:57:59 -07:00
|
|
|
|
|
|
|
ssl_certificate SSL_CERT;
|
|
|
|
ssl_certificate_key SSL_KEY;
|
2018-07-05 23:17:00 -07:00
|
|
|
ssl_trusted_certificate SSL_CHAIN_CERT;
|
2017-10-24 16:57:59 -07:00
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
|
|
|
|
|
|
|
|
access_log off;
|
|
|
|
|
2017-11-26 00:14:49 -08:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
2017-10-24 16:57:59 -07:00
|
|
|
location /download {
|
2017-11-01 16:29:02 -07:00
|
|
|
proxy_pass http://worker;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /api/webhooks {
|
|
|
|
proxy_pass http://backend;
|
|
|
|
client_max_body_size 128k;
|
2017-10-24 16:57:59 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
2017-11-01 16:29:02 -07:00
|
|
|
proxy_pass http://backend;
|
2017-10-24 16:57:59 -07:00
|
|
|
proxy_buffers 8 16k;
|
|
|
|
proxy_buffer_size 16k;
|
|
|
|
}
|
|
|
|
}
|