From d33373b13e9e2bbc1df3fd799412db4398d7935a Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Fri, 22 May 2020 23:43:32 -0400 Subject: [PATCH] Fixes environment variables, npm scripts, and a trailing slash --- .travis.yml | 13 +++++++++---- docker/docker-compose.yml | 2 +- package.json | 5 ++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6dd8adc..dd9110e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,12 +31,17 @@ addons: env: global: - - BASE_HREF="/" - - API_URL="http://db:5000/v1.0" - - IRB_URL="http://pb:5001" - + - API_URL=http://localhost:5000/v1.0 + - BASE_HREF=/ + - HOME_ROUTE=home + - IRB_URL=http://localhost:5001 + - PORT0=4200 + - PRODUCTION=false script: + - cp src/index.html src/index.html.tmp - npm run ci + - rm src/index.html + - mv src/index.html.tmp src/index.html deploy: provider: script diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c37f9f6..e832bc4 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -48,7 +48,7 @@ services: - UPGRADE_DB=true - RESET_DB=true - LDAP_URL=ldap - - PB_BASE_URL=http://pb:5001/pb + - PB_BASE_URL=http://pb:5001/pb/ - DB_HOST=db - DB_PORT=5432 - DB_PASSWORD=crc_pass diff --git a/package.json b/package.json index c4601e6..0dc45e2 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,8 @@ "e2e-wf:db-setup": "docker exec -it backend pipenv run flask load-example-data", "e2e-wf:pb-setup": "docker exec -it pb pipenv run flask db upgrade", "e2e-wf": "npm run e2e-wf:stop && npm run e2e-wf:clean && npm run e2e-wf:build && npm run e2e-wf:start && npm run e2e-wf:db-upgrade && npm run e2e-wf:db-setup && npm run e2e-wf:pb-setup", - "e2e:env": "cp src/index.html src/index.html.tmp && chmod +x ./docker/substitute-env-variables.sh && ./docker/substitute-env-variables.sh src/index.html PRODUCTION,API_URL,IRB_URL,HOME_ROUTE,BASE_HREF,PORT0", - "e2e:env-restore": "rm src/index.html && mv src/index.html.tmp src/index.html", - "ci": "npm run lint && npm run test:coverage && npm run e2e:env && npm run e2e:with-wf && npm run e2e:env-restore && sonar-scanner" + "env": "chmod +x ./docker/substitute-env-variables.sh && ./docker/substitute-env-variables.sh src/index.html PRODUCTION,API_URL,IRB_URL,HOME_ROUTE,BASE_HREF,PORT0", + "ci": "npm run lint && npm run test:coverage && npm run env && npm run e2e:with-wf && sonar-scanner" }, "private": true, "dependencies": {