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 {
|
2018-08-05 17:18:49 -07:00
|
|
|
listen 443;
|
2017-11-21 22:41:55 -08:00
|
|
|
|
2018-12-10 19:15:21 -08:00
|
|
|
root /var/www/;
|
|
|
|
index index.html;
|
|
|
|
|
2018-07-05 23:17:00 -07:00
|
|
|
server_name podsync.net;
|
2017-11-21 22:41:55 -08:00
|
|
|
|
2018-08-05 17:18:49 -07:00
|
|
|
ssl on;
|
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 / {
|
2018-12-21 16:36:34 -08:00
|
|
|
try_files $uri $uri.html $uri/ @backend;
|
2018-12-10 19:15:21 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
location @backend {
|
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;
|
|
|
|
}
|
2018-08-05 17:18:49 -07:00
|
|
|
}
|