Optimize Docker (#575)

* reduce docker dev size

* reduce docker prod size

* fix lint

* add gunicorn

* fix bandit reported issues

* add docs external link icon

* add env vars to docs

* add permission to docker

* merge to one backend Dockerfile

* fix codefactor issues

* add docs for puid/pgid

* add docker healthcheck
This commit is contained in:
wengtad
2021-06-23 02:22:31 +08:00
committed by GitHub
parent 6320ba7ec5
commit 999d0d4322
34 changed files with 465 additions and 193 deletions

View File

@@ -0,0 +1,11 @@
/* Add target="_blank" to external links */
/* Source: https://html.com/attributes/a-target/#:~:text=browser */
function externalLinks() {
for (var c = document.getElementsByTagName("a"), a = 0; a < c.length; a++) {
var b = c[a];
b.getAttribute("href") &&
b.hostname !== location.hostname &&
(b.target = "_blank");
}
}
externalLinks();

View File

@@ -33,6 +33,12 @@ a.md-button.md-button:hover {
color: #ffffff;
}
/* Add icon after external links */
/* Ignore auto-generated material theme links */
a[target="_blank"]:not([class*="md-"]):after {
content: " " url("../svg/open-in-new.svg");
}
/* Site width etc.*/
.md-grid {
max-width: 64rem !important;

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24">
<path fill="rgb(229,131,37)" d="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z" />
</svg>

After

Width:  |  Height:  |  Size: 259 B