-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c92d92
commit 6cf4fa7
Showing
8 changed files
with
71 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
# Print the value of BASE_PATH for debugging | ||
echo "BASE_PATH is: $BASE_PATH" | ||
|
||
if [ -z "$BASE_PATH" ]; then | ||
echo "BASE_PATH is empty or not set. Using root.template." | ||
cp /etc/nginx/templates/root.template /etc/nginx/templates/default.conf.template | ||
else | ||
echo "BASE_PATH is set to: $BASE_PATH. Using subpath.template." | ||
cp /etc/nginx/templates/subpath.template /etc/nginx/templates/default.conf.template | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m; | ||
|
||
server { | ||
|
||
root /usr/share/nginx/html; | ||
|
||
listen ${API_PORT}; | ||
location ${BASE_PATH} { | ||
rewrite ${BASE_PATH}/(.*) /$1 break; | ||
try_files $uri $uri/ /index.html; | ||
client_max_body_size 1000M; | ||
} | ||
|
||
location ${BASE_PATH}/files/ { | ||
rewrite ${BASE_PATH}/(.*) /$1 break; | ||
alias /var/www/statics/; | ||
} | ||
|
||
location ${BASE_PATH}/api { | ||
rewrite ${BASE_PATH}/(.*) /$1 break; | ||
|
||
# Define cache parameters | ||
proxy_cache my_cache; | ||
proxy_cache_valid 200 10m; | ||
proxy_cache_methods GET HEAD; | ||
proxy_cache_key $scheme$proxy_host$request_uri; | ||
|
||
|
||
include uwsgi_params; | ||
uwsgi_pass ${API_HOST}:${API_PORT}; | ||
client_max_body_size 1000M; | ||
uwsgi_read_timeout 600; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters