-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from alkem-io/develop
Notifications Stabilization
- Loading branch information
Showing
17 changed files
with
130 additions
and
58 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,10 @@ COPY package*.json ./ | |
RUN npm i -g [email protected] | ||
RUN npm install | ||
|
||
## Add the wait script to the image | ||
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.7.3/wait /wait | ||
RUN chmod +x /wait | ||
|
||
# If you are building your code for production | ||
# RUN npm ci --only=production | ||
|
||
|
@@ -28,5 +32,4 @@ RUN npm run build | |
|
||
ENV NODE_ENV=${ENV_ARG} | ||
|
||
EXPOSE ${GRAPHQL_ENDPOINT_PORT_ARG} | ||
CMD ["/bin/sh", "-c", "npm run start:prod"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const DEFAULT_ENDPOINTS = { | ||
alkemioServer: 'http://localhost:3000/admin/graphql', | ||
kratosApiEndpoint: 'http://localhost:3000/identity/ory/kratos/public', | ||
}; | ||
|
||
export const DEFAULT_SERVICE_ACCOUNT_CREDENTIALS = { | ||
email: '[email protected]', | ||
password: 'change-me-now', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './defaults'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './enums'; | ||
export * from './exceptions'; | ||
export * from './constants'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ export class ApplicationNotificationBuilder { | |
} | ||
|
||
const getBaseNotification = (payload: any, applicant: User) => ({ | ||
emailFrom: '<[email protected]>', | ||
emailFrom: '[email protected]', | ||
applicant: { | ||
name: applicant.displayName, | ||
email: applicant.email, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { AlkemioClient } from '@alkemio/client-lib'; | ||
import { | ||
DEFAULT_ENDPOINTS, | ||
DEFAULT_SERVICE_ACCOUNT_CREDENTIALS, | ||
} from '@src/common/constants/defaults'; | ||
import * as dotenv from 'dotenv'; | ||
|
||
const main = async () => { | ||
dotenv.config(); | ||
|
||
const alkemioClient = new AlkemioClient({ | ||
graphqlEndpoint: | ||
process.env.ALKEMIO_SERVER_ENDPOINT ?? DEFAULT_ENDPOINTS.alkemioServer, | ||
authInfo: { | ||
credentials: { | ||
email: | ||
process.env.SERVICE_ACCOUNT_USERNAME ?? | ||
DEFAULT_SERVICE_ACCOUNT_CREDENTIALS.email, | ||
password: | ||
process.env.SERVICE_ACCOUNT_PASSWORD ?? | ||
DEFAULT_SERVICE_ACCOUNT_CREDENTIALS.password, | ||
}, | ||
kratosPublicApiEndpoint: | ||
process.env.KRATOS_API_PUBLIC_ENDPOINT ?? | ||
DEFAULT_ENDPOINTS.kratosApiEndpoint, | ||
}, | ||
}); | ||
|
||
console.log(`Client config: ${JSON.stringify(alkemioClient.config)}`); | ||
await alkemioClient.enableAuthentication(); | ||
|
||
console.log(`API Token: ${alkemioClient.apiToken}`); | ||
|
||
const serverVersion = await alkemioClient.validateConnection(); | ||
console.log(`Alkemio platform version: ${serverVersion}`); | ||
|
||
const hubID = 'Test'; | ||
const hubExists = await alkemioClient.hubExists(hubID); | ||
console.log(`Hub '${hubID}' exists: ${hubExists}`); | ||
}; | ||
|
||
try { | ||
main(); | ||
} catch (error) { | ||
console.error(error); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters