diff options
author | crupest <crupest@outlook.com> | 2022-11-26 17:21:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-26 17:21:33 +0800 |
commit | 31af13e54a1fa2c669f7d8ecca8a0c8e2d067676 (patch) | |
tree | 588d8efd20f1e427a9c72ce8fadd8a5dcb0b4879 /template | |
parent | 6259ab6ae42fefc3328d61fd016401342c08a90f (diff) | |
download | crupest-31af13e54a1fa2c669f7d8ecca8a0c8e2d067676.tar.gz crupest-31af13e54a1fa2c669f7d8ecca8a0c8e2d067676.tar.bz2 crupest-31af13e54a1fa2c669f7d8ecca8a0c8e2d067676.zip |
Add crupest-api.
Diffstat (limited to 'template')
-rw-r--r-- | template/crupest-api-config.json.template | 8 | ||||
-rw-r--r-- | template/nginx/reverse-proxy.conf.template | 1 | ||||
-rw-r--r-- | template/nginx/root.conf.template | 15 |
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 { |