Skip to content

Commit

Permalink
AWS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Duplyakin committed Feb 15, 2024
1 parent 8be3d07 commit 0eb981e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ EXPOSE 80
# Conda env in the path below needs to match the name in the first line of environment.yml
#CMD ["/opt/conda/envs/dw-tap-api/bin/python", "api.py", "--production"]
#CMD ["python", "api.py", "--production"]
CMD ["python", "proto.py", "--production"]
#CMD ["python", "proto.py", "--production"]

# Not working: Version that allows following a file with out and err messages
# Version that allows following a file with out and err messages
CMD ["/bin/bash", "-c", "python proto.py --production >> proto.out 2>&1"]

3 changes: 1 addition & 2 deletions templates/universal_bc_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,5 @@
</html>
<!--
Notes:
URL_PREFIX (2 places) will be populated when universal_bc_index.html becomes bc_index.html for the current environment (AWS or not)
NEED_SPECIFIC_REQ_ID, NEED_SPECIFIC_LAT and NEED_SPECIFIC_LON will be populated in the second pass, when ts_index.htm becomes served/bc_<req_id>.html
URL_PREFIX (1 place) will be populated when universal_bc_index.html becomes bc_index.html for the current environment (AWS or not)
-->
12 changes: 6 additions & 6 deletions templates/universal_by_address.html
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,13 @@
}

document.getElementById("fetching_msg").innerHTML = "";
// Old way: works locally, fails in AWS
//window.location.href = "URL_PREFIX" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;

window.location.href = "URL_PREFIX" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;
// New way: opens a new tab
window.open(
"URL_PREFIX" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years,
'_blank' // <- This is what makes it open in a new window.
);
//window.open(
// "URL_PREFIX" + "/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years,
// '_blank' // <- This is what makes it open in a new window.
// );
}
}
);
Expand Down
11 changes: 5 additions & 6 deletions templates/universal_on_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,12 @@
else {
endpoint = "ts";
}
// Old way: works locally, fails in AWS
//window.location.href = "URL_PREFIX" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years;
window.location.href = "URL_PREFIX" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years;
// New way: opens a new tab
window.open(
"URL_PREFIX" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years,
'_blank' // <- This is what makes it open in a new window.
);
//window.open(
// "URL_PREFIX" +"/" + endpoint + "?height=" + hub_height + "m&lat=" + lat + "&lon=" + lon + "&year=" + years,
// '_blank' // <- This is what makes it open in a new window.
// );
}
</script>

Expand Down

0 comments on commit 0eb981e

Please sign in to comment.