diff --git a/web.zip b/web.zip new file mode 100644 index 0000000..c7e0bb5 Binary files /dev/null and b/web.zip differ diff --git a/webserver-docker/docker-compose.yml b/webserver-docker/docker-compose.yml new file mode 100644 index 0000000..e1af718 --- /dev/null +++ b/webserver-docker/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3.9" + +services: + angular-web: + image: nginx:stable-alpine + container_name: angular-web + ports: + - "8080:80" + volumes: + - /opt/stacks/angular-web/dist:/usr/share/nginx/html:ro + - /opt/stacks/angular-web/nginx.conf:/etc/nginx/conf.d/default.conf:ro + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 10s diff --git a/webserver-docker/nginx.conf b/webserver-docker/nginx.conf new file mode 100644 index 0000000..07d9fd9 --- /dev/null +++ b/webserver-docker/nginx.conf @@ -0,0 +1,44 @@ +server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + charset utf-8; + + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_min_length 1024; + gzip_types + text/plain + text/css + text/javascript + application/javascript + application/json + application/xml + application/rss+xml + image/svg+xml; + + location / { + try_files $uri $uri/ /index.html =404; + } + + location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ { + expires 30d; + add_header Cache-Control "public, max-age=2592000, immutable"; + try_files $uri =404; + } + + location = /index.html { + add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate"; + expires -1; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + internal; + } +}