aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/crupest-api-config.json.template8
-rw-r--r--template/nginx/reverse-proxy.conf.template1
-rw-r--r--template/nginx/root.conf.template15
3 files changed, 23 insertions, 1 deletions
diff --git a/template/crupest-api-config.json.template b/template/crupest-api-config.json.template
new file mode 100644
index 0000000..fc5eb85
--- /dev/null
+++ b/template/crupest-api-config.json.template
@@ -0,0 +1,8 @@
+{
+ "Todos": {
+ "Username": "$CRUPEST_GITHUB_USERNAME",
+ "ProjectNumber": "$CRUPEST_GITHUB_PROJECT_NUMBER",
+ "Token": "$CRUPEST_GITHUB_TOKEN",
+ "Count": "$CRUPEST_GITHUB_TODO_COUNT"
+ }
+}
diff --git a/template/nginx/reverse-proxy.conf.template b/template/nginx/reverse-proxy.conf.template
index 81ba1e9..99184e0 100644
--- a/template/nginx/reverse-proxy.conf.template
+++ b/template/nginx/reverse-proxy.conf.template
@@ -8,7 +8,6 @@ server {
server_name ${CRUPEST_NGINX_SUBDOMAIN}.${CRUPEST_DOMAIN};
location / {
- proxy_cache off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
diff --git a/template/nginx/root.conf.template b/template/nginx/root.conf.template
index 8214bf7..110def4 100644
--- a/template/nginx/root.conf.template
+++ b/template/nginx/root.conf.template
@@ -1,9 +1,24 @@
+upstream crupest-api {
+ server crupest-api:5000
+}
+
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ${CRUPEST_DOMAIN};
root /srv/www;
+
+ location /api {
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $connection_upgrade;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_pass http://crupest-api;
+ }
}
server {