Skip to content

Commit

Permalink
Labeling updates
Browse files Browse the repository at this point in the history
- Relabel from `scv` and `scjscv` to `jasper`.

Signed-off-by: Wade Barnes <wade@neoterictech.ca>
  • Loading branch information
WadeBarnes committed Jul 22, 2024
1 parent 18eba70 commit 9d5029c
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The OpenShift build and deployment configurations for the project can be found h

For high level View API documentation refer to the diagram above. For details, refer to the [router](./web/src/router/index.ts) and [view components](./web/src/components/) source code.

For backend API documentation refer to the Swagger API documentation page available at the `api/` endpoint of the running application. For example, if you are running the application locally in docker, the Swagger page can be found at https://localhost:8080/scjscv/api/. Refer to [Running in Docker](#running-in-docker) section for details.
For backend API documentation refer to the Swagger API documentation page available at the `api/` endpoint of the running application. For example, if you are running the application locally in docker, the Swagger page can be found at https://localhost:8080/jasper/api/. Refer to [Running in Docker](#running-in-docker) section for details.

## Getting Help or Reporting an Issue

Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ Since the services are started interactively, you will have to issue this comman

## Using the Application

- By default, the main developer UI is exposed at; https://localhost:8080/scjscv/
- The Swagger API and documentation is available at; https://localhost:8080/scjscv/api/
- By default, the main developer UI is exposed at; https://localhost:8080/jasper/
- The Swagger API and documentation is available at; https://localhost:8080/jasper/api/
- Which is also exposed directly at; http://localhost:5000/api/
2 changes: 1 addition & 1 deletion docker/api/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ENV CORS_DOMAIN='http://localhost:8080'
ENV DOTNET_STARTUP_PROJECT='./api/api.csproj'
ENV DOTNET_USE_POLLING_FILE_WATCHER 1

RUN curl -sSL https://aka.ms/getvsdbgsh | /bin/sh /dev/stdin -v latest -l /vsdbg
RUN curl -sSL https://aka.ms/getvsdbgsh | /bin/sh /dev/stdin -v latest -l /vsdbg
16 changes: 8 additions & 8 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.4"
services:

web:
image: scv-web
image: "${COMPOSE_PROJECT_NAME}-web"
environment:
- API_URL=${API_URL}
- USE_SELF_SIGNED_SSL=${USE_SELF_SIGNED_SSL}
Expand All @@ -16,7 +16,7 @@ services:
- api

web-dev:
image: "scv-web-dev"
image: "${COMPOSE_PROJECT_NAME}-web-dev"
environment:
- API_URL=${API_URL}
- WEB_BASE_HREF=${WEB_BASE_HREF}
Expand All @@ -33,8 +33,8 @@ services:
- api

api:
image: scv-api
environment:
image: "${COMPOSE_PROJECT_NAME}-api"
environment:
- ASPNETCORE_URLS=${ASPNETCORE_URLS}
- FileServicesClient__Username=${FileServicesClientUsername}
- FileServicesClient__Password=${FileServicesClientPassword}
Expand Down Expand Up @@ -73,8 +73,8 @@ services:
- ../api/:/opt/app-root/src/api
- ../db/:/opt/app-root/src/db
- ../jc-interface-client/:/opt/app-root/src/jc-interface-client
- scv-api-dev-bin:/opt/app-root/src/api/bin
- scv-api-dev-obj:/opt/app-root/src/api/obj
- api-dev-bin:/opt/app-root/src/api/bin
- api-dev-obj:/opt/app-root/src/api/obj
- ./seed:/opt/app-root/data
depends_on:
- db
Expand All @@ -97,5 +97,5 @@ services:
- ./tmp:/tmp2

volumes:
scv-api-dev-bin:
scv-api-dev-obj:
api-dev-bin:
api-dev-obj:
30 changes: 15 additions & 15 deletions docker/manage
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ -z "$(type -P "$S2I_EXE")" ]; then
fi

SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
export COMPOSE_PROJECT_NAME="${COMPOSE_PROJECT_NAME-scv}"
export COMPOSE_PROJECT_NAME="${COMPOSE_PROJECT_NAME-jasper}"

# =================================================================================================================
# Usage:
Expand Down Expand Up @@ -79,7 +79,7 @@ build-api() {
echo -e "Building api image using docker ..."
echo -e "----------------------------------------------------------------------------------------------------"
docker build \
-t 'scv-api' \
-t "${COMPOSE_PROJECT_NAME}-api" \
-f './api//Dockerfile.dev' '..'

echo -e "===================================================================================================="
Expand All @@ -90,35 +90,35 @@ build-web() {
# web
#
# The web-runtime image is used for the final runtime image.
# The scv-app image is used to build the artifacts for the vue distribution.
# The artifacts image is used to build the artifacts for the vue distribution.
# The vue-on-nginx image is copy of the nginx-runtime image complete with a copy of the build artifacts.
#
echo -e "\n\n===================================================================================================="
echo -e "Building the scv-web-runtime (nginx-runtime) image using Docker ..."
echo -e "Building the ${COMPOSE_PROJECT_NAME}-web-runtime (nginx-runtime) image using Docker ..."
echo -e "----------------------------------------------------------------------------------------------------"
docker build \
-t 'scv-web-runtime' \
-t "${COMPOSE_PROJECT_NAME}-web-runtime" \
-f './nginx-runtime/Dockerfile' './nginx-runtime/'
echo -e "===================================================================================================="

# Apparently vue-cli-tools wants WEB_BASE_HREF -> vue.config.js -> publicPath at compile time.
# I tried using __webpack_public_path__, but the CSS file path and JS file path weren't correctly updated.
# Also note we don't load in environment variables from the arguments here.
echo -e "\n\n===================================================================================================="
echo -e "Building the scv-web-artifacts image using s2i ..."
echo -e "Building the ${COMPOSE_PROJECT_NAME}-web-artifacts image using s2i ..."
echo -e "----------------------------------------------------------------------------------------------------"
${S2I_EXE} build \
--copy \
'../web' \
'quay.io/centos7/nodejs-12-centos7:master' \
'scv-web-artifacts'
"${COMPOSE_PROJECT_NAME}-web-artifacts"
echo -e "===================================================================================================="

echo -e "\n\n===================================================================================================="
echo -e "Building the scv-web image using Docker ..."
echo -e "Building the ${COMPOSE_PROJECT_NAME}-web image using Docker ..."
echo -e "----------------------------------------------------------------------------------------------------"
docker build \
-t 'scv-web' \
-t "${COMPOSE_PROJECT_NAME}-web" \
--build-arg IMAGE_PREFIX=${COMPOSE_PROJECT_NAME}- \
-f './vue-on-nginx/Dockerfile' './vue-on-nginx/'
echo -e "===================================================================================================="
Expand All @@ -129,15 +129,15 @@ build-web-dev() {
# web-dev
#
echo -e "\n\n===================================================================================================="
echo -e "Building the scv-web-dev image using s2i ..."
echo -e "Building the ${COMPOSE_PROJECT_NAME}-web-dev image using s2i ..."
echo -e "----------------------------------------------------------------------------------------------------"
${S2I_EXE} build \
--copy \
-e "DEV_MODE=true" \
-e WEB_BASE_HREF=${WEB_BASE_HREF} \
'../web' \
'centos/nodejs-12-centos7' \
'scv-web-dev'
"${COMPOSE_PROJECT_NAME}-web-dev"
echo -e "===================================================================================================="
}

Expand All @@ -156,15 +156,15 @@ configureEnvironment () {
esac
done

# scv-db
# Default database startup parameters
export POSTGRESQL_DATABASE=${POSTGRESQL_DATABASE:-appdb}
export POSTGRESQL_USER=${POSTGRESQL_USER:-scv}
export POSTGRESQL_USER=${POSTGRESQL_USER:-${COMPOSE_PROJECT_NAME}}
export POSTGRESQL_PASSWORD=${POSTGRESQL_PASSWORD:-jeKEumGzuRVY4EJyfcUk}
export POSTGRESQL_ADMIN_PASSWORD=${POSTGRESQL_ADMIN_PASSWORD:-yM%J]7RZgY@!zb=*#4kB}

# scv-web
# Default web startup parameters
export API_URL=${API_URL-http://api:5000/api/}
export WEB_BASE_HREF=${WEB_BASE_HREF-/scjscv/}
export WEB_BASE_HREF=${WEB_BASE_HREF-/jasper/}
}

getStartupParams() {
Expand Down
4 changes: 2 additions & 2 deletions web/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM nginx:stable

ENV STI_SCRIPTS_PATH=/usr/libexec/s2i
ENV USE_SELF_SIGNED_SSL='usss'
ENV WEB_BASE_HREF='/scjscv/'
ENV WEB_BASE_HREF='/jasper/'
ENV API_URL='http://host.docker.internal:5000/api/'
ENV RealIpFrom='172.17.0.1'
ENV NODE_ENV='development'
Expand Down Expand Up @@ -35,7 +35,7 @@ COPY nginx.conf.template /tmp/
# - The application artifacts live in /tmp
# ---------------------------------------------------------------------------------
RUN chmod -R g+rwx $STI_SCRIPTS_PATH
RUN chmod og+rw /var/cache/nginx \
RUN chmod og+rw /var/cache/nginx \
/var/run \
/etc/nginx/nginx.conf \
/tmp
Expand Down
8 changes: 4 additions & 4 deletions web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Vue.component('loading-spinner', LoadingSpinner);

Vue.http.interceptors.push(function () {
return function (response) {
if (response.status == 401) {
if (response.status == 401) {
location.replace(`${process.env.BASE_URL}api/auth/login?redirectUri=${window.location}`);
}
};
});

Vue.http.options.root = process.env.BASE_URL;

//Redirect from / to /scjscv/
// Redirect from / to /jasper/
if (location.pathname == "/")
history.pushState({ page: "home" }, "", process.env.BASE_URL);

Expand All @@ -42,5 +42,5 @@ const router = new VueRouter({
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app');
render: h => h(App)
}).$mount('#app');
6 changes: 3 additions & 3 deletions web/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const path = require("path");
const vueSrc = "src";

//I noticed when we don't have publicPath set to /, it becomes problematic using vue-cli-tools - it doesn't seem to respect history paths.
//EX. scjscv/civil-files/5555 wont work when you navigate directly to it with vue-cli-tools versus NGINX it works fine.
//When deployed over NGINX this problem seems to go away. So I've left it as / for now in local development environments.
//EX. jasper/civil-files/5555 wont work when you navigate directly to it with vue-cli-tools versus NGINX it works fine.
//When deployed over NGINX this problem seems to go away. So I've left it as / for now in local development environments.
module.exports = {
publicPath: process.env.NODE_ENV == 'production' ? '/S2I_INJECT_PUBLIC_PATH/' : '/',
//chainWebpack: config => config.optimization.minimize(false), Disable minification.
Expand All @@ -19,7 +19,7 @@ module.exports = {
poll: 1000,
},
proxy: {
//This is for WEB_BASE_HREF = '/' specifically.
//This is for WEB_BASE_HREF = '/' specifically.
//If having problems connecting, try adding: netsh http add iplisten 127.0.0.1
'^/api': {
target: "http://host.docker.internal:5000",
Expand Down

0 comments on commit 9d5029c

Please sign in to comment.