Commit 306c2415 authored by jcorvi's avatar jcorvi
Browse files

Merge branch 'int_tox_hub' into 'develop'

Int tox hub

See merge request !20
parents cff759bb 30eb6737
Pipeline #27080 passed with stage
in 2 minutes and 53 seconds
...@@ -8,19 +8,32 @@ RUN npm update ...@@ -8,19 +8,32 @@ RUN npm update
COPY . . COPY . .
COPY src/assets/index.template.html src/index.html COPY src/assets/index.template.html src/index.html
#RUN npm run build --prod #RUN npm run build --prod
RUN ./node_modules/.bin/ng build --prod --base-href /pretox/ RUN ./node_modules/.bin/ng build --prod --base-href /pretoxtm.kh.svc/
### STAGE 2: Run ### ### STAGE 2: Run ###
FROM nginx:1.17.1-alpine FROM nginx:1.21.6-alpine
#fix refresh #fix refresh
#https://makinhs.medium.com/for-some-folks-who-will-get-in-trouble-with-refresh-the-angular-page-and-get-a-404-2cf394b5dac6 #https://makinhs.medium.com/for-some-folks-who-will-get-in-trouble-with-refresh-the-angular-page-and-get-a-404-2cf394b5dac6
RUN rm -rf /usr/share/nginx/html/* && rm -rf /etc/nginx/nginx.conf RUN rm -rf /usr/share/nginx/html/* && rm -rf /etc/nginx/nginx.conf
COPY ./nginx.conf /etc/nginx/nginx.conf COPY ./nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/src/app/dist/my-app /usr/share/nginx/html/pretox COPY --from=build /usr/src/app/dist/my-app /usr/share/nginx/html
COPY src/manage /usr/share/nginx/html/manage
RUN apk add util-linux
RUN cp /usr/share/nginx/html/manage/v1/api.template /usr/share/nginx/html/manage/v1/api
RUN sed -i "s/{RELEASE_DATE}/$(date +%F)/g" /usr/share/nginx/html/manage/v1/api
RUN sed -i "s/{APP_VERSION}/2.0/g" /usr/share/nginx/html/manage/v1/api
RUN sed -i "s/{UUID}/$(uuidgen)/g" /usr/share/nginx/html/manage/v1/api
RUN rm /usr/share/nginx/html/manage/v1/api.template
#CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/pretox/assets/env.template.js > /usr/share/nginx/html/pretox/assets/env.js && exec nginx -g 'daemon off;'"] #CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/pretox/assets/env.template.js > /usr/share/nginx/html/pretox/assets/env.js && exec nginx -g 'daemon off;'"]
CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/pretox/assets/env.template.js > /usr/share/nginx/html/pretox/assets/env.js && envsubst < /usr/share/nginx/html/pretox/index.html > /usr/share/nginx/html/pretox/index.html_2 && cp /usr/share/nginx/html/pretox/index.html_2 /usr/share/nginx/html/pretox/index.html && exec nginx -g 'daemon off;'"]
#CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/pretox/assets/index.template.html > /usr/share/nginx/html/pretox/index.html && exec nginx -g 'daemon off;'"]
CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/assets/env.template.js > /usr/share/nginx/html/assets/env.js && envsubst < /usr/share/nginx/html/index.html > /usr/share/nginx/html/index.html_2 && cp /usr/share/nginx/html/index.html_2 /usr/share/nginx/html/index.html && exec nginx-debug -g 'daemon off;'"]
#CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/pretox/assets/env.template.js > /usr/share/nginx/html/pretox/assets/env.js && envsubst < /usr/share/nginx/html/pretox/index.html > /usr/share/nginx/html/pretox/index.html_2 && cp /usr/share/nginx/html/pretox/index.html_2 /usr/share/nginx/html/pretox/index.html && exec nginx-debug -g 'daemon off;'"]
#CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/pretox/assets/index.template.html > /usr/share/nginx/html/pretox/index.html && exec nginx -g 'daemon off;'"]
# && exec nginx-debug -g 'daemon off;'
#FROM nginx:1.17.1-alpine #FROM nginx:1.17.1-alpine
#COPY /dist/my-app /usr/share/nginx/html #COPY /dist/my-app /usr/share/nginx/html
This diff is collapsed.
worker_processes 1; worker_processes 1;
error_log /var/log/nginx/error.log debug;
events { events {
worker_connections 1024; worker_connections 1024;
......
openapi: 3.0.2
info:
title: Pretox TM
termsOfService: http://etransafe.eu
description: >
A preclinical text mining tool for detecting treatment-related findings.
contact:
name: BSC
url: https://www.bsc.es/
email: javier.corvi@bsc.es
license:
name: eTRANSAFE Consortium License 1.0
url: https://etransafe.eu
version: 2.0
x-meta:
serviceType: frontend
uuid: 9618248c-38a7-4112-ab2e-b0ea0e111151
provider: BSC
created: 2022-01-31
released: {RELEASE_DATE}
lastChanged: {RELEASE_DATE}
software:
- name: Angular
version: 11
description: Angular framework
provider: Acme Corporation
license:
name: Angular MIT-License
url: https://angular.io/license
servers:
- url: /manage/v1
description: Base URL of the API
paths:
/api:
get:
summary: Returns this API definition
description: Reports this API definition.
responses:
200:
description: YAML specification of this API
content:
text/yaml:
schema:
type: object
/ready:
get:
summary: Returns the online status of the service
description: Reports the online status (readiness) of the service.
responses:
200:
description: Service is ready.
content:
text/plain:
schema:
type: string
example: Service is ready.
/alive:
get:
summary: Returns the health status of the service
description: Reports the health status (leaviness) of the service.
responses:
200:
description: Service is alive.
content:
text/plain:
schema:
type: string
example: Service is alive and healthy.
/../../..:
get:
summary: UI of the service
description: Redirects to the UI of the service, which would be <host>/basePath/ then.
responses:
200:
description: Service UI.
content:
text/html:
schema:
type: string
example: Service UI.
openapi: 3.0.2
info:
title: Pretox TM
termsOfService: http://etransafe.eu
description: >
A preclinical text mining tool for detecting treatment-related findings.
contact:
name: Barcelona Supercomputing Center
url: https://www.bsc.es/
email: javier.corvi@bsc.es
license:
name: GNU GENERAL PUBLIC LICENSE Version 3
url: https://etransafe.eu
version: {APP_VERSION}
x-meta:
serviceType: frontend
uuid: {UUID}
provider: BSC
created: 2022-01-31
released: {RELEASE_DATE}
lastChanged: {RELEASE_DATE}
software:
- name: Angular
version: 8
description: Angular framework
provider: Acme Corporation
license:
name: Angular MIT-License
url: https://angular.io/license
servers:
- url: /manage/v1
description: Base URL of the API
paths:
/api:
get:
summary: Returns this API definition
description: Reports this API definition.
responses:
200:
description: YAML specification of this API
content:
text/yaml:
schema:
type: object
/ready:
get:
summary: Returns the online status of the service
description: Reports the online status (readiness) of the service.
responses:
200:
description: Service is ready.
content:
text/plain:
schema:
type: string
example: Service is ready.
/alive:
get:
summary: Returns the health status of the service
description: Reports the health status (leaviness) of the service.
responses:
200:
description: Service is alive.
content:
text/plain:
schema:
type: string
example: Service is alive and healthy.
/../../..:
get:
summary: UI of the service
description: Redirects to the UI of the service, which would be <host>/basePath/ then.
responses:
200:
description: Service UI.
content:
text/html:
schema:
type: string
example: Service UI.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment