Skip to content

Commit

Permalink
rename project
Browse files Browse the repository at this point in the history
  • Loading branch information
wermarter committed Jan 9, 2024
1 parent daa28cd commit 4dd4db6
Show file tree
Hide file tree
Showing 438 changed files with 242 additions and 354 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/hcdc-access-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: hcdc-access-service

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'libs/common/**'
- 'libs/nest-core/**'
- 'libs/hcdc-common/**'
- 'apps/hcdc-access-service/**'

jobs:
j1:
uses: ./.github/workflows/docker-publish.yaml
with:
dockerfile-path: ./apps/hcdc-access-service/Dockerfile
docker-image-name: diut-hcdc-access-service
secrets: inherit

j2:
needs: j1
uses: ./.github/workflows/helm-appversion.yaml
with:
chart-path: ./apps/hcdc-access-service/k8s/helm-chart/Chart.yaml
identity: hcdc-access-service
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: levansy-web-app
name: hcdc-web-app

on:
workflow_dispatch:
Expand All @@ -8,21 +8,21 @@ on:
paths:
- 'libs/common/**'
- 'libs/web-core/**'
- 'libs/levansy-common/**'
- 'apps/levansy-web-app/**'
- 'libs/hcdc-common/**'
- 'apps/hcdc-web-app/**'

jobs:
j1:
uses: ./.github/workflows/docker-publish.yaml
with:
dockerfile-path: ./apps/levansy-web-app/Dockerfile
docker-image-name: diut-levansy-web-app
dockerfile-path: ./apps/hcdc-web-app/Dockerfile
docker-image-name: diut-hcdc-web-app
secrets: inherit

j2:
needs: j1
uses: ./.github/workflows/helm-appversion.yaml
with:
chart-path: ./apps/levansy-web-app/k8s/helm-chart/Chart.yaml
identity: levansy-web-app
chart-path: ./apps/hcdc-web-app/k8s/helm-chart/Chart.yaml
identity: hcdc-web-app
secrets: inherit
28 changes: 0 additions & 28 deletions .github/workflows/levansy-access-service.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
HTTP_PORT=5000

NODE_ENV=development
SERVICE_NAME=levansy-access-service
SERVICE_NAME=hcdc-access-service

MONGO_URI=mongodb://root:password@mongodb-0.mongodb-headless.diut.svc.cluster.local:27017,mongodb-1.mongodb-headless.diut.svc.cluster.local:27017,mongodb-2.mongodb-headless.diut.svc.cluster.local:27017/levansy?authSource=admin
MONGO_URI=mongodb://root:password@mongodb-0.mongodb-headless.diut.svc.cluster.local:27017,mongodb-1.mongodb-headless.diut.svc.cluster.local:27017,mongodb-2.mongodb-headless.diut.svc.cluster.local:27017/hcdc?authSource=admin

AUTH_JWT_SECRET=very-seret-tex
AUTH_JWT_EXPIRE_SECONDS=3600
Expand All @@ -13,7 +13,7 @@ MINIO_ENDPOINT=minio.diut.svc.cluster.local
MINIO_PORT=9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_SAMPLE_IMAGES_BUCKET=levansy-images
MINIO_SAMPLE_IMAGES_BUCKET=hcdc-images
MINIO_PUBLIC_BUCKET=diut-public

LOKI_URL=http://loki-gateway.observability.svc.cluster.local
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ FROM base AS development

RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prefer-offline

CMD pnpm --filter "@diut/levansy-access-service..." run --parallel dev
CMD pnpm --filter "@diut/hcdc-access-service..." run --parallel dev

###################
# build
###################

FROM development AS build

RUN pnpm --filter "@diut/levansy-access-service" run build
RUN pnpm --filter "@diut/hcdc-access-service" run build

RUN pnpm prune --prod

Expand Down Expand Up @@ -73,4 +73,4 @@ COPY --from=build /usr/src/app .

ENTRYPOINT ["/sbin/tini", "--"]

CMD ["node", "./apps/levansy-access-service/dist/main.js"]
CMD ["node", "./apps/hcdc-access-service/dist/main.js"]
3 changes: 3 additions & 0 deletions apps/hcdc-access-service/k8s/down.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

helm uninstall -n diut-hcdc access-service
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PARENT_DIR=$( dirname $SCRIPT_DIR )

kubectl -n diut-levansy create configmap --from-env-file $PARENT_DIR/.env access-service-env
kubectl -n diut-hcdc create configmap --from-env-file $PARENT_DIR/.env access-service-env
1 change: 1 addition & 0 deletions apps/hcdc-access-service/k8s/env-delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubectl -n diut-hcdc delete configmap access-service-env
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
repository: wermarter/diut-levansy-access-service
repository: wermarter/diut-hcdc-access-service
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: ''
Expand Down
2 changes: 2 additions & 0 deletions apps/hcdc-access-service/k8s/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker build -t wermarter/diut-hcdc-access-service:dev --target production -f ./apps/hcdc-access-service/Dockerfile .
docker push wermarter/diut-hcdc-access-service:dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PARENT_DIR=$( dirname $SCRIPT_DIR )

helm upgrade --install -n diut-levansy access-service $SCRIPT_DIR/helm-chart --render-subchart-notes
helm upgrade --install -n diut-hcdc access-service $SCRIPT_DIR/helm-chart --render-subchart-notes
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@diut/levansy-access-service",
"name": "@diut/hcdc-access-service",
"version": "1.0.0",
"description": "Main server for the project",
"repository": "https://github.com/wermarter/diut",
Expand All @@ -15,7 +15,7 @@
"@casl/ability": "^6.5.0",
"@casl/mongoose": "^7.2.1",
"@diut/common": "workspace:*",
"@diut/levansy-common": "workspace:*",
"@diut/hcdc-common": "workspace:*",
"@diut/nest-core": "workspace:*",
"@nestjs/cli": "^10.2.1",
"@nestjs/common": "^10.2.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dotenv.config()

import { COLLECTION } from 'src/infrastructure/mongo/collections'
import { Patient } from 'src/resources/patients/patient.schema'
import { Gender } from '@diut/levansy-common'
import { Gender } from '@diut/hcdc-common'

async function main() {
const [sourceDB, targetDB] = await Promise.all([
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { EDomain } from '../base'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { EAuthn } from './base'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { EAuthn } from './base'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'
import { HttpStatus } from '@nestjs/common'

import { EAuthn } from './base'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { EAuthn } from './base'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { EDomain } from '../base'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { EAuthz } from './base'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

export class EDomain extends Error {
errorCode: DomainErrorCode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { EDomain } from '../base'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpStatus } from '@nestjs/common'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { EDomain } from '../base'

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { Expose } from 'class-transformer'
import { IsEnum, IsOptional, IsString } from 'class-validator'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Logger,
} from '@nestjs/common'
import { HttpAdapterHost } from '@nestjs/core'
import { DomainErrorCode } from '@diut/levansy-common'
import { DomainErrorCode } from '@diut/hcdc-common'

import { HttpErrorResponse } from '../dto'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ WORKDIR /usr/src/app

RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prefer-offline

CMD pnpm --filter "@diut/levansy-web-app..." run --parallel dev
CMD pnpm --filter "@diut/hcdc-web-app..." run --parallel dev

EXPOSE 5173

Expand All @@ -26,17 +26,17 @@ EXPOSE 5173

FROM development AS build

RUN pnpm --filter "@diut/levansy-web-app" run build
RUN pnpm --filter "@diut/hcdc-web-app" run build

###################
# FINAL
###################

FROM nginx:alpine AS production

COPY --from=build /usr/src/app/apps/levansy-web-app/dist /usr/share/nginx/web-app
COPY --from=build /usr/src/app/apps/hcdc-web-app/dist /usr/share/nginx/web-app

COPY --from=build /usr/src/app/apps/levansy-web-app/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/src/app/apps/hcdc-web-app/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions apps/hcdc-web-app/k8s/down.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

helm uninstall -n diut-hcdc web-app
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
repository: wermarter/diut-levansy-web-app
repository: wermarter/diut-hcdc-web-app
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ''
Expand Down
2 changes: 2 additions & 0 deletions apps/hcdc-web-app/k8s/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker build -t wermarter/diut-hcdc-web-app:dev --target production -f ./apps/hcdc-web-app/Dockerfile .
docker push wermarter/diut-hcdc-web-app:dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PARENT_DIR=$( dirname $SCRIPT_DIR )

helm upgrade --install -n diut-levansy web-app $SCRIPT_DIR/helm-chart --render-subchart-notes
helm upgrade --install -n diut-hcdc web-app $SCRIPT_DIR/helm-chart --render-subchart-notes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@diut/levansy-web-app",
"name": "@diut/hcdc-web-app",
"version": "1.0.0",
"description": "Web client for the project",
"repository": "https://github.com/wermarter/diut",
Expand All @@ -16,7 +16,7 @@
},
"dependencies": {
"@diut/common": "workspace:*",
"@diut/levansy-common": "workspace:*",
"@diut/hcdc-common": "workspace:*",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@hookform/resolvers": "^3.3.2",
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Permission, LoginExceptionMsg } from '@diut/levansy-common'
import { Permission, LoginExceptionMsg } from '@diut/hcdc-common'
import { apiSlice as api } from './slice'
export const addTagTypes = ['auth'] as const
const injectedRtkApi = api
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Gender } from '@diut/levansy-common'
import { Gender } from '@diut/hcdc-common'
import { apiSlice as api } from './slice'
export const addTagTypes = ['patients', 'samples'] as const
const injectedRtkApi = api
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrintForm, SampleExceptionMsg } from '@diut/levansy-common'
import { PrintForm, SampleExceptionMsg } from '@diut/hcdc-common'
import { apiSlice as api } from './slice'
export const addTagTypes = ['samples'] as const
const injectedRtkApi = api
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PatientCategory } from '@diut/levansy-common'
import { PatientCategory } from '@diut/hcdc-common'
import { apiSlice as api } from './slice'
import { TestResponseDto } from './test'
export const addTagTypes = ['test-elements', 'tests'] as const
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrintForm } from '@diut/levansy-common'
import { PrintForm } from '@diut/hcdc-common'
import { BioProductResponseDto } from './bio-product'
import { apiSlice as api } from './slice'
import { TestCategoryResponseDto } from './test-category'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Permission, UserExceptionMsg } from '@diut/levansy-common'
import { Permission, UserExceptionMsg } from '@diut/hcdc-common'
import { apiSlice as api } from './slice'
export const addTagTypes = ['users'] as const
const injectedRtkApi = api
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
checkPermissionAllOf,
checkPermissionAnyOf,
} from '@diut/levansy-common'
import { checkPermissionAllOf, checkPermissionAnyOf } from '@diut/hcdc-common'

import { useTypedSelector, drawerItems, DrawerItem } from 'src/core'
import { selectUserPermissions } from 'src/modules/auth'
Expand Down
File renamed without changes.
Loading

0 comments on commit 4dd4db6

Please sign in to comment.