Skip to content

Commit

Permalink
Feature/2903/robots (#118)
Browse files Browse the repository at this point in the history
* Create and serve a robots.txt

dockstore/dockstore#2903

* Run mustache on robots template

* Update compose.config

Co-authored-by: Charles Overbeck <[email protected]>
  • Loading branch information
denis-yuen and coverbeck authored Jan 9, 2020
1 parent 9479763 commit 0d9010b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dockstore_launcher_config/compose.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"PUBLIC_LAUNCHER_IP_ADDRESS":"",
"DOCKSTORE_VERSION":"1.7.0-alpha.1",
"DOCKSTORE_VERSION":"1.8.0-beta.4",
"GITHUB_CLIENT1_ID":"foobared",
"GITHUB_CLIENT2_ID":"foobared",
"GITHUB_CLIENT1_SECRET":"foobared",
Expand Down
1 change: 1 addition & 0 deletions install_bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function template()
mkdir -p config
mustache dockstore_launcher_config/compose.config templates/Dockerfile_webservice.template > config/Dockerfile_webservice
mustache dockstore_launcher_config/compose.config templates/Dockerfile_ui2.template > config/Dockerfile_ui2
mustache dockstore_launcher_config/compose.config templates/robots.txt.template > config/robots.txt
mustache dockstore_launcher_config/compose.config templates/web.yml.template > config/web.yml
mustache dockstore_launcher_config/compose.config templates/default.nginx_http.conf.template > config/default.nginx_http.conf
mustache dockstore_launcher_config/compose.config templates/default.nginx_https.conf.template > config/default.nginx_https.conf
Expand Down
1 change: 1 addition & 0 deletions templates/Dockerfile_ui2.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ FROM nginx:1.13.1
RUN mkdir /usr/share/nginx/html2
COPY --from=builder /index.html /usr/share/nginx/html2
COPY --from=builder /manifest.json /usr/share/nginx/html2
COPY config/robots.txt /usr/share/nginx/html2
5 changes: 5 additions & 0 deletions templates/default.nginx_https.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ server {
proxy_pass http://webservice:8080/$uri;
}

location /robots.txt {
root /usr/share/nginx/html2;
return robots.txt;
}

location / {
root /usr/share/nginx/html2;
index index.html index.htm;
Expand Down
4 changes: 4 additions & 0 deletions templates/robots.txt.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-Agent: *
Allow: /

Sitemap: http{{#HTTPS}}s{{/HTTPS}}://{{ DOMAIN_NAME }}/robots.txt;

0 comments on commit 0d9010b

Please sign in to comment.