Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions share/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: v1
apiVersion: v2
description: SHARE
name: share
version: 0.6.3
type: application
version: 1.0.0
keywords:
- open
- science
Expand All @@ -17,5 +18,10 @@ maintainers:
- name: Uditi Mehta
email: uditi@cos.io
url: https://github.com/uditijmehta
engine: gotpl
tillerVersion: '>=2.7.0'
dependencies:
# - name: cos-common
# version: 1.0.1
# repository: "file://../cos-common"
- name: cos-common
version: 1.0.1
repository: https://centerforopenscience.github.io/helm-charts/
111 changes: 111 additions & 0 deletions share/files/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
user nginx;
worker_processes 1;

pid /var/run/nginx.pid;

error_log /var/log/nginx/error.log warn;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $upstream_cache_status $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$http_x_forwarded_for" '
'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';
access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 620s;
keepalive_requests 10000;
types_hash_max_size 2048;
server_tokens off;

gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_comp_level 2;
gzip_min_length 512;
gzip_proxied any;
gzip_vary on;
gzip_types text/plain
text/css
image/svg+xml
application/javascript
application/x-javascript
text/xml
application/xml
text/javascript
application/json
application/xml+rss
application/vnd.api+json;

server {
listen {{ .Values.web.http.internalPort }};
keepalive_timeout 620s;
root /static/code;
client_max_body_size 25M;
server_name _;

if ($http_x_forwarded_proto = "http") {
return 301 https://$host$request_uri;
}

location = /healthz {
access_log off;
return 200;
}

location = /robots.txt {
alias /usr/share/nginx/html/robots.txt;
}

{{- if .Values.web.mediaUrl }}
location /media/ {
proxy_redirect off;
proxy_buffering off;
proxy_pass {{ .Values.web.mediaUrl }};
}
{{- else }}
# location /media/ {
# alias /media/;
# }
{{- end }}

location = /favicon.ico {
rewrite ^/(.*)$ /static/$1;
}

{{- if .Values.web.staticUrl }}
location /static/ {
proxy_redirect off;
proxy_buffering off;
proxy_pass {{ .Values.web.staticUrl }};
}
{{- else }}
location /static/ {
alias /static/;
}
{{- end }}

location / {
# Disable caching of application requests
add_header Cache-Control "no-cache, no-store, max-age=0, must-revalidate";
add_header Expires "-1";
add_header Pragma "no-cache";
add_header Strict-Transport-Security "max-age=31536000";

# Pass requests to uwsgi application
include /etc/nginx/uwsgi_params;
uwsgi_buffering off;
uwsgi_request_buffering off;
uwsgi_pass uwsgi://127.0.0.1:{{ .Values.web.http.externalPort }};
}

}
}
12 changes: 0 additions & 12 deletions share/requirements.lock

This file was deleted.

13 changes: 0 additions & 13 deletions share/requirements.yaml

This file was deleted.

8 changes: 7 additions & 1 deletion share/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
TODO
SHARE chart deployed.

Web service name:
{{ include "cos-common.fullname" (dict "root" . "name" "web" "values" .Values.web) | trim }}

Port-forward (web):
kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "cos-common.fullname" (dict "root" . "name" "web" "values" .Values.web) | trim }} 8080:{{ .Values.web.http.externalPort }}
164 changes: 0 additions & 164 deletions share/templates/_helpers.tpl

This file was deleted.

Loading