Skip to content
Snippets Groups Projects
Commit 957c3667 authored by Zitnik, Anze's avatar Zitnik, Anze
Browse files

Enable setting of API URL via environment variable.

Squashed commit of the following:

commit 00434fb5
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Mon May 30 17:09:08 2022 +0200

    Version 0.1.5

commit 8c3a83fe
Merge: 41cff35a f05e3580
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Mon May 30 15:08:02 2022 +0000

    Merge branch 'settable-api-url' into 'develop'

    Enable setting of API URL via environment variable.

    See merge request medina/cce-frontend!4

commit f05e3580
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Mon May 30 15:08:01 2022 +0000

    Enable setting of API URL via environment variable.

commit 41cff35a
Merge: a83a43f5 0e63df2e
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Mon May 30 15:48:32 2022 +0200

    Merge branch 'master' into develop

commit a83a43f5
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Mon May 30 13:31:46 2022 +0200

    Version 0.1.4

commit 05820fd4
Merge: a19afbab 023e3fdd
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Mon May 30 11:30:14 2022 +0000

    Merge branch 'auto-collapse' into 'develop'

    Start with collapsed nodes

    See merge request medina/cce-frontend!3

commit 023e3fdd
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Mon May 30 11:30:14 2022 +0000

    Start with collapsed nodes

commit a19afbab
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Fri May 27 13:33:56 2022 +0200

    Version up: 0.1.3

commit a2bf39a7
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Thu May 26 17:39:06 2022 +0200

    Add targetValue property.

    Rearrange properties in infoBox.
    Don't show 'code' if same as 'name'.

commit d7dd3b66
Merge: 0bedbed3 dc3d4b90
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Fri May 20 10:04:47 2022 +0200

    Merge branch 'master' into develop

commit 0bedbed3
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Fri May 20 10:00:02 2022 +0200

    Minor fix in instructions.

commit 8df42ada
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Fri May 20 09:47:09 2022 +0200

    Revert "Updated getting for CI from package.json"

    This reverts commit 64b5b515.

commit e318c485
Author: Anže Žitnik <anze.zitnik@xlab.si>
Date:   Fri May 20 09:31:26 2022 +0200

    Version up - 1.1.2

commit 95f07516
Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
Date:   Thu May 19 19:26:49 2022 +0200

    Added word breaking, permanent node description box option, instructions

commit 64b5b515
Author: Aljaz Nuncic <aljaz.nuncic@xlab.si>
Date:   Thu May 19 19:25:53 2022 +0200

    Updated getting for CI from package.json
parent 0e63df2e
No related branches found
No related tags found
No related merge requests found
VUE_APP_API="https://cce-api-dev.k8s.medina.esilab.org" VUE_APP_API="<<CCE_API_URL>>"
...@@ -22,6 +22,8 @@ RUN rm -rf /usr/share/nginx/html/* ...@@ -22,6 +22,8 @@ RUN rm -rf /usr/share/nginx/html/*
# Copy from build stage # Copy from build stage
COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY --from=build-stage /app/entrypoint.sh /root
RUN chmod u+x /root/entrypoint.sh
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD /root/entrypoint.sh
\ No newline at end of file \ No newline at end of file
...@@ -39,8 +39,7 @@ docker run -p 8081:80 registry-gitlab.xlab.si/medina/cce-frontend:latest ...@@ -39,8 +39,7 @@ docker run -p 8081:80 registry-gitlab.xlab.si/medina/cce-frontend:latest
Before pushing to master check if version needs to be updated in [package.json](package.json#L3). Before pushing to master check if version needs to be updated in [package.json](package.json#L3).
This version is also used for tagging docker image at CI. This version is also used for tagging docker image at CI.
## Setting API url ## Setting API URL
You can set the API URL in the environment file. You can set the API URL using the `CCE_API_URL` environment variable.
For local development (npm run serve) it is set in [.env.development](.env.development) and for production (docker run) in [.env.production](.env.production). By default (if unset) the URL used is MEDINA k8s dev deploy: https://cce-api-dev.k8s.medina.esilab.org
The environment must be set up before build.
\ No newline at end of file
URL="${CCE_API_URL:-https://cce-api-dev.k8s.medina.esilab.org}"
sed -i "s|<<CCE_API_URL>>|${CCE_API_URL}|" /usr/share/nginx/html/js/app.*.js
nginx -g 'daemon off;'
{ {
"name": "cce-frontend", "name": "cce-frontend",
"version": "0.1.4", "version": "0.1.5",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment