Skip to content

Commit

Permalink
Update project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
baering committed Dec 3, 2024
1 parent dfb5dfa commit 46d1a58
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
7 changes: 5 additions & 2 deletions apps/payments/infra/payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ const image = namespace

const basepath = '/greida'

export const serviceSetup = (): ServiceBuilder<'payments'> =>
export const serviceSetup = (services: {
api: ServiceBuilder<'api'>
}): ServiceBuilder<'payments'> =>
service(serviceName)
.namespace(namespace)
.image(image)
.namespace(namespace)
.env({
BASEPATH: basepath,
API_URL: ref((h) => `http://${h.svc(services.api)}`),
})
.secrets({
SI_PUBLIC_CONFIGCAT_SDK_KEY: '/k8s/configcat/CONFIGCAT_SDK_KEY',
Expand Down
7 changes: 6 additions & 1 deletion apps/payments/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ const { createVanillaExtractPlugin } = require('@vanilla-extract/next-plugin')

const withVanillaExtract = createVanillaExtractPlugin()

const { API_URL = 'http://localhost:4444', CONFIGCAT_SDK_KEY } = process.env
const {
API_URL = 'http://localhost:4444',
CONFIGCAT_SDK_KEY,
BASEPATH = '/greida',
} = process.env

const graphqlPath = '/api/graphql'

Expand All @@ -29,6 +33,7 @@ const nextConfig = {
graphqlEndpoint: graphqlPath,
configCatSdkKey: CONFIGCAT_SDK_KEY,
},
basePath: `${BASEPATH}`,
env: {
API_MOCKS: process.env.API_MOCKS || '',
},
Expand Down
1 change: 1 addition & 0 deletions apps/payments/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/payments",
"projectType": "application",
"prefix": "payments",
"tags": ["scope:react-next"],
"targets": {
"build": {
Expand Down
25 changes: 7 additions & 18 deletions apps/payments/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,16 @@
"compilerOptions": {
"jsx": "preserve",
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"types": ["node", "jest"],
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"strictNullChecks": true
"incremental": true
},
"include": [".next/types/**/*.ts"],
"exclude": ["node_modules"],
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
}
]
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "next-env.d.ts"],
"exclude": ["node_modules", "jest.config.ts"]
}
1 change: 1 addition & 0 deletions charts/islandis/values.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,7 @@ namespaces:
payments:
enabled: true
env:
API_URL: 'http://web-api.islandis.svc.cluster.local'
BASEPATH: '/greida'
LOG_LEVEL: 'info'
NODE_OPTIONS: '--max-old-space-size=230 -r dd-trace/init'
Expand Down
1 change: 1 addition & 0 deletions charts/services/payments/values.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ global:
name: 'payments'
enabled: true
env:
API_URL: 'http://web-api.islandis.svc.cluster.local'
BASEPATH: '/greida'
LOG_LEVEL: 'info'
NODE_OPTIONS: '--max-old-space-size=230 -r dd-trace/init'
Expand Down
2 changes: 1 addition & 1 deletion infra/src/uber-charts/islandis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ const authAdminApi = authAdminApiSetup()
const universityGatewayService = universityGatewaySetup()
const universityGatewayWorker = universityGatewayWorkerSetup()

const paymentsWebApp = paymentsWebAppServiceSetup()
const paymentsMicroservice = paymentsMicroserviceServiceSetup()

const api = apiSetup({
Expand All @@ -129,6 +128,7 @@ const adminPortal = adminPortalSetup()
const servicePortal = servicePortalSetup()
const bffAdminPortalService = bffAdminPortalServiceSetup({ api })
const bffServicePortalService = bffServicePortalServiceSetup({ api })
const paymentsWebApp = paymentsWebAppServiceSetup({ api })

const appSystemForm = appSystemFormSetup()
const web = webSetup({ api })
Expand Down

0 comments on commit 46d1a58

Please sign in to comment.