Skip to content

Commit

Permalink
fix: revert NGINX changes; prepare release (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
kulgg authored Apr 18, 2024
1 parent a12f147 commit 4d13ea6
Show file tree
Hide file tree
Showing 9 changed files with 761 additions and 99 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ the detailed section referring to by linking pull requests or issues.

#### Deployment Migration Notes

## [v3.2.1] - 2024-04-18

### Overview

NGINX Config Fix

### Detailed Changes

#### Patch

- Revert NGINX header changes because they disallow E2E testing of edc-ce

#### Deployment Migration Notes

_No special deployment migration steps required_

## [v3.2.0] - 2024-04-18

MDS Bufix Release
Expand Down
11 changes: 1 addition & 10 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,12 @@
"with": "src/environments/environment.prod.ts"
}
],
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"outputHashing": "all",
"sourceMap": {
"hidden": false,
"scripts": true,
"styles": true
},
"subresourceIntegrity": true
}
},
"development": {
"buildOptimizer": false,
Expand Down
9 changes: 0 additions & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ COPY --from=npm-install /app/node_modules /app/node_modules
COPY ./ /app/
RUN npm run ng build --no-progress --configuration=production

RUN ./docker/generate-csp-hash.mjs dist/edc-demo-client/*.js > script-src.txt

# Stage 3: Serve app with nginx
FROM docker.io/nginxinc/nginx-unprivileged:1.25-alpine3.18

Expand All @@ -30,13 +28,6 @@ COPY docker/default.conf.template etc/nginx/templates/default.conf.template
# so that the automatic envsubst templating is not disabled.
COPY docker/99-generate-app-config.sh /docker-entrypoint.d/99-generate-app-config.sh

# Mount the template from the build context and the hash list from the previous stage
# instead of copying them, as they are not needed in the final image.
RUN --mount=type=bind,from=build,source=/app/script-src.txt,target=/tmp/script-src.txt \
--mount=type=bind,source=/docker/headers.include.template,target=/tmp/headers.include.template \
env SCRIPT_SRC_EXTRA="$(cat /tmp/script-src.txt)" \
envsubst '$$SCRIPT_SRC_EXTRA' < /tmp/headers.include.template > /etc/nginx/headers.include

RUN ln -sf /tmp/app-config.json /usr/share/nginx/html/assets/config/app-config.json \
# Nginx is configured to reject symlinks that point to a file owned by a different user, for security reasons
&& chown --no-dereference nginx:root /usr/share/nginx/html/assets/config/app-config.json
Expand Down
6 changes: 1 addition & 5 deletions docker/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ server {
root /usr/share/nginx/html;

location / {
add_header Cache-Control "public, immutable, max-age=604800";
include headers.include;

index do-not-use-me.html;
try_files $uri @index;
}

location @index {
add_header Cache-Control "no-cache";
include headers.include;
add_header Cache-Control no-cache;
expires 0;
index index.html;
try_files /index.html =404;
Expand Down
17 changes: 0 additions & 17 deletions docker/generate-csp-hash.mjs

This file was deleted.

47 changes: 0 additions & 47 deletions docker/headers.include.template

This file was deleted.

Loading

0 comments on commit 4d13ea6

Please sign in to comment.