Skip to content

Commit

Permalink
Merge pull request #873 from gisaia/feat/no-analytics
Browse files Browse the repository at this point in the history
Add a new image of arlas-wui that doesn't embark analytics
  • Loading branch information
MohamedHamouGisaia authored Sep 11, 2024
2 parents 3bd7fe5 + 07c3c53 commit def7112
Show file tree
Hide file tree
Showing 11 changed files with 500 additions and 98 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## [v26.0.0-rc.4](https://github.com/gisaia/ARLAS-WUI/tree/v26.0.0-rc.4) (2024-09-11)

[Full Changelog](https://github.com/gisaia/ARLAS-WUI/compare/v26.0.0-rc.3...v26.0.0-rc.4)

## [v26.0.0-rc.3](https://github.com/gisaia/ARLAS-WUI/tree/v26.0.0-rc.3) (2024-09-11)

[Full Changelog](https://github.com/gisaia/ARLAS-WUI/compare/v26.0.0-rc.2...v26.0.0-rc.3)

## [v26.0.0-rc.2](https://github.com/gisaia/ARLAS-WUI/tree/v26.0.0-rc.2) (2024-09-06)

[Full Changelog](https://github.com/gisaia/ARLAS-WUI/compare/v26.0.0-rc.1...v26.0.0-rc.2)
Expand All @@ -13,6 +21,7 @@
**Fixed bugs:**

- errors related to bounding box + resizehistogram at init [\#871](https://github.com/gisaia/ARLAS-wui/issues/871)
- The resultlist is not updated after removing the bbox [\#868](https://github.com/gisaia/ARLAS-wui/issues/868)
- The information icon 'i' stays on the item after closing the detail in the resultlist [\#866](https://github.com/gisaia/ARLAS-wui/issues/866)
- When I log out, a blank page is displayed [\#864](https://github.com/gisaia/ARLAS-wui/issues/864)

Expand Down
43 changes: 43 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,46 @@
"output": "/assets/rotate/"
}
]
},
"production-no-analytics": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"index": {
"input": "src/index-without-analytics.html",
"output": "index.html"
},
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.prod.ts"
}
],
"assets": [
{
"input": "src/environments/prod/",
"output": "/",
"glob": "*.yaml"
},
"src/assets",
"src/silent-refresh.html",
"src/favicon.ico",
{
"glob": "**/*",
"input": "./node_modules/arlas-web-components/assets/resize",
"output": "/assets/resize/"
},
{
"glob": "**/*",
"input": "./node_modules/arlas-web-components/assets/rotate",
"output": "/assets/rotate/"
}
]
}
}
},
Expand All @@ -112,6 +152,9 @@
},
"production": {
"browserTarget": "arlas-wui:build:production"
},
"production-no-analytics": {
"browserTarget": "arlas-wui:build:production-no-analytics"
}
},
"defaultConfiguration": "development"
Expand Down
48 changes: 48 additions & 0 deletions docker/Dockerfile-production
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
### STAGE 1: Build ###

# We label our stage as 'builder'
FROM node:16.19.0 as builder

COPY ./package.json ./
COPY ./package-lock.json ./

RUN npm set progress=false && npm config set depth 0 && npm cache clean --force

## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN export NODE_OPTIONS=--max_old_space_size=8192 && npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app

COPY ./scripts/start.sh ./ng-app
COPY ./scripts/fetch-conf-by-http.sh ./ng-app

WORKDIR /ng-app

COPY . .

## Build the angular app in production mode and store the artifacts in dist folder
RUN export NODE_OPTIONS=--max_old_space_size=8192 && $(npm bin)/ng build --configuration production --aot --base-href='$ARLAS_WUI_BASE_HREF/'

### STAGE 2: Setup ###

FROM nginx:1.25.3-alpine3.18-slim
ARG version="latest"

LABEL io.arlas.wui.version=${version}
LABEL vendor="Gisaïa"
LABEL description="This container build and serve the ARLAS-wui app"

RUN apk add --update bash jq netcat-openbsd curl && rm -rf /var/cache/apk/*

## Copy our default nginx config
COPY nginx/default.conf /etc/nginx/conf.d/

## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*

## From 'builder' stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /ng-app/dist /usr/share/nginx/html
COPY --from=builder /ng-app/start.sh /usr/share/nginx/
COPY --from=builder /ng-app/fetch-conf-by-http.sh /usr/share/nginx/

HEALTHCHECK CMD curl --fail http://localhost:80/ || exit 1

CMD /usr/share/nginx/start.sh
48 changes: 48 additions & 0 deletions docker/Dockerfile-production-no-analytics
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
### STAGE 1: Build ###

# We label our stage as 'builder'
FROM node:16.19.0 as builder

COPY ./package.json ./
COPY ./package-lock.json ./

RUN npm set progress=false && npm config set depth 0 && npm cache clean --force

## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN export NODE_OPTIONS=--max_old_space_size=8192 && npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app

COPY ./scripts/start.sh ./ng-app
COPY ./scripts/fetch-conf-by-http.sh ./ng-app

WORKDIR /ng-app

COPY . .

## Build the angular app in production mode and store the artifacts in dist folder
RUN export NODE_OPTIONS=--max_old_space_size=8192 && $(npm bin)/ng build --configuration production-no-analytics --aot --base-href='$ARLAS_WUI_BASE_HREF/'

### STAGE 2: Setup ###

FROM nginx:1.25.3-alpine3.18-slim
ARG version="latest"

LABEL io.arlas.wui.version=${version}
LABEL vendor="Gisaïa"
LABEL description="This container build and serve the ARLAS-wui app"

RUN apk add --update bash jq netcat-openbsd curl && rm -rf /var/cache/apk/*

## Copy our default nginx config
COPY nginx/default.conf /etc/nginx/conf.d/

## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*

## From 'builder' stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /ng-app/dist /usr/share/nginx/html
COPY --from=builder /ng-app/start.sh /usr/share/nginx/
COPY --from=builder /ng-app/fetch-conf-by-http.sh /usr/share/nginx/

HEALTHCHECK CMD curl --fail http://localhost:80/ || exit 1

CMD /usr/share/nginx/start.sh
2 changes: 1 addition & 1 deletion license-check-and-add.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ignore": [".github/**", ".git/**", "e2e/**", "*", "**/*.sh", "*.yml", "**/*.yaml", "**/*.conf", "**/*.md", "**/*.svg", "**/*.spec.ts", "**/*.html", "**/*.woff2", "src/test.ts", "**/.DS_Store", "**/.gitkeep", "patches/*", "**/*.xml", "**/*.csv"],
"ignore": [".github/**", ".git/**", "e2e/**", "*", "**/*.sh", "*.yml", "**/*.yaml", "**/*.conf", "**/*.md", "**/*.svg", "**/*.spec.ts", "**/*.html", "**/*.woff2", "src/test.ts", "**/.DS_Store", "**/.gitkeep", "patches/*", "**/*.xml", "**/*.csv", "docker/*"],
"license": "LICENSE",
"trailingWhitespace": "TRIM",
"licenseFormats": {
Expand Down
Loading

0 comments on commit def7112

Please sign in to comment.