deployment_files
This commit is contained in:
Executable
+49
@@ -0,0 +1,49 @@
|
||||
events {
|
||||
worker_connections 768;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
server {
|
||||
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
# ==========================================
|
||||
# APK DOWNLOAD
|
||||
# Serves the built APK for direct download,
|
||||
# e.g. http://<host>/app-release.apk
|
||||
# ==========================================
|
||||
|
||||
location / {
|
||||
autoindex on;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location ~ \.apk$ {
|
||||
add_header Content-Disposition "attachment";
|
||||
default_type application/vnd.android.package-archive;
|
||||
}
|
||||
|
||||
# ==========================================
|
||||
# BACKEND (handles /backend/ AND /<any-prefix>/backend/)
|
||||
# ==========================================
|
||||
|
||||
location ~ ^/(?:[^/]+/)*backend/(.*)$ {
|
||||
|
||||
proxy_pass http://127.0.0.1:9292/$1$is_args$args;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Authorization $http_authorization;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user