Build websites inside docker multi-stage build

This commit is contained in:
2020-05-07 17:12:13 +02:00
parent 9936941ba8
commit cda9bf6006
5 changed files with 33 additions and 548 deletions
+15 -6
View File
@@ -4,7 +4,6 @@
-Date
Strict-Transport-Security "max-age=31536000; includeSubDomains"
Content-Security-Policy "default-src 'self' 'unsafe-inline';"
Feature-Policy "geolocation none;midi none;notifications none;push none;sync-xhr none;microphone none;camera none;magnetometer none;gyroscope none;speaker self;vibrate none;fullscreen self;payment none;"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
@@ -13,7 +12,7 @@
}
}
localhost {
simplenotes.be {
@static {
path *.css *.js
file
@@ -30,22 +29,32 @@ localhost {
handle_errors {
rewrite @404 /404.html
file_server
import security
}
route /api/* {
uri strip_prefix /api
reverse_proxy http://localhost:8081
reverse_proxy http://api:8081
}
header @static Cache-Control "public, max-age=31536000"
header Content-Security-Policy "default-src 'self' 'unsafe-inline';"
encode gzip
root * /home/hubert/Workspace/Notes-TFE/frontend/dist
root * /site
log
import security
}
www.localhost {
redir * https://localhost{path}
www.simplenotes.be {
redir * https://simplenotes.be{path}
}
docs.simplenotes.be {
file_server
root * /docs
import security
header Content-Security-Policy "default-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net;"
}