diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..70d0ba4e --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 18.16.1 diff --git a/Dockerfile b/Dockerfile index 15a25fe1..13dac11b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/nodejs-16 +FROM registry.access.redhat.com/ubi8/nodejs-18 USER root diff --git a/Dockerfile.tester b/Dockerfile.tester index e0e50270..dd0f9ce4 100644 --- a/Dockerfile.tester +++ b/Dockerfile.tester @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/nodejs-16 +FROM registry.access.redhat.com/ubi8/nodejs-18 USER root diff --git a/Makefile b/Makefile index 62506262..43bbe299 100644 --- a/Makefile +++ b/Makefile @@ -26,3 +26,6 @@ build-test: test: build-test @docker run --rm $(IMAGE_TEST) + +dev-docker-run: build + docker run --rm -p 8080:8080 -e AUTHORIZATION=blub -e API_AUTH=blub -e API_URI=https://app-interface.devshift.net -e GRAPHQL_URI=https://app-interface.devshift.net -v $(shell pwd)/public/env:/opt/visual-qontract/build/env $(IMAGE_NAME):latest diff --git a/README.md b/README.md index e6c5e521..73d5683d 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,7 @@ It is written in [React](https://reactjs.org/) and uses [PatternFly 3](https://w ```sh $ cp public/env/env.js.example public/env/env.js -$ sed -i.bk '/GRAPHQL_URI/d' public/env/env.js -$ docker run --rm -p 8080:8080 \ - -e AUTHORIZATION="Basic " -e GRAPHQL_URI="" \ - -v $PWD/public/env:/opt/visual-qontract/build/env:z \ - quay.io/app-sre/visual-qontract:latest +$ make dev-docker-run ``` The visual-qontract UI will be reachable on http://localhost:8080 diff --git a/package.json b/package.json index 8b9be90e..ef3233e1 100644 --- a/package.json +++ b/package.json @@ -47,12 +47,12 @@ "copy-img": "ncp node_modules/patternfly/dist/img src/img", "build-css": "sass --style compressed $npm_package_sassIncludes_src $npm_package_sassIncludes_patternfly $npm_package_sassIncludes_patternflyReact $npm_package_sassIncludes_bootstrap $npm_package_sassIncludes_fontAwesome src/", "watch-css": "yarn build-css && sass --watch --style compressed $npm_package_sassIncludes_src $npm_package_sassIncludes_patternfly $npm_package_sassIncludes_patternflyReact $npm_package_sassIncludes_bootstrap $npm_package_sassIncludes_fontAwesome src/", - "build-js": "react-scripts build", + "build-js": "react-scripts --openssl-legacy-provider build", "start:dev": "npm-run-all -p watch-css start:local build-fragment", - "start:local": "react-scripts start", + "start:local": "react-scripts --openssl-legacy-provider start", "build": "yarn copy-fonts && yarn copy-img && yarn build-css && yarn build-js && yarn postbuild", - "test": "yarn lint && react-scripts test --env=jsdom --watchAll=false", - "eject": "react-scripts eject", + "test": "yarn lint && react-scripts --openssl-legacy-provider test --env=jsdom --watchAll=false", + "eject": "react-scripts --openssl-legacy-provider eject", "prettier": "prettier --write --single-quote --trailing-comma=none \"src/**/*.js\"", "analyze": "source-map-explorer build/static/js/main.*", "lint": "yarn lint:js",