-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Letsencrypt automatic cert generation for monitoring packages #320
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 |
---|---|---|
|
@@ -34,6 +34,7 @@ services: | |
keycloak: | ||
default: | ||
|
||
|
||
networks: | ||
reverse-proxy: | ||
name: reverse-proxy_public | ||
|
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 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 |
---|---|---|
|
@@ -33,6 +33,7 @@ services: | |
elastic: | ||
default: | ||
|
||
|
||
configs: | ||
kibana-kibana.yml: | ||
file: ./kibana.yml | ||
|
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 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 |
---|---|---|
|
@@ -18,6 +18,6 @@ | |
"FHIR_IG_IMPORTER_CORE_VERSION": "latest", | ||
"OPENHIM_CONSOLE_BASE_URL": "http://localhost:9000", | ||
"OPENHIM_API_USERNAME": "[email protected]", | ||
"OPENHIM_API_PASSWORD": "instant101" | ||
"OPENHIM_IG_PASSWORD": "instant101" | ||
} | ||
} |
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 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 |
---|---|---|
|
@@ -6,7 +6,7 @@ services: | |
image: node:erbium-alpine | ||
environment: | ||
OPENHIM_API_USERNAME: '[email protected]' | ||
OPENHIM_API_PASSWORD: 'openhim-password' | ||
OPENHIM_DEFAULT_PASSWORD: 'openhim-password' | ||
# Reject unauthorised is only needed if the OpenHIM's SSL is not setup | ||
NODE_TLS_REJECT_UNAUTHORIZED: 0 | ||
command: sh -c "node openhimConfig.js" | ||
|
60 changes: 30 additions & 30 deletions
60
interoperability-layer-openhim/importer/volume/openhimConfig.js
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,54 +1,54 @@ | ||
'use strict' | ||
"use strict"; | ||
|
||
const fs = require('fs') | ||
const https = require('https') | ||
const path = require('path') | ||
const fs = require("fs"); | ||
const https = require("https"); | ||
const path = require("path"); | ||
|
||
const OPENHIM_CORE_SERVICE_NAME = 'openhim-core' | ||
const OPENHIM_MEDIATOR_API_PORT = 8080 | ||
const OPENHIM_CORE_SERVICE_NAME = "openhim-core"; | ||
const OPENHIM_MEDIATOR_API_PORT = 8080; | ||
const OPENHIM_API_PASSWORD = | ||
process.env.OPENHIM_API_PASSWORD || 'openhim-password' | ||
process.env.OPENHIM_DEFAULT_PASSWORD || "openhim-password"; | ||
const OPENHIM_API_USERNAME = | ||
process.env.OPENHIM_API_USERNAME || '[email protected]' | ||
process.env.OPENHIM_API_USERNAME || "[email protected]"; | ||
|
||
const authHeader = new Buffer.from( | ||
`${OPENHIM_API_USERNAME}:${OPENHIM_API_PASSWORD}` | ||
).toString('base64') | ||
).toString("base64"); | ||
|
||
const jsonData = JSON.parse( | ||
fs.readFileSync(path.resolve(__dirname, 'openhim-import.json')) | ||
) | ||
fs.readFileSync(path.resolve(__dirname, "openhim-import.json")) | ||
); | ||
|
||
const data = JSON.stringify(jsonData) | ||
const data = JSON.stringify(jsonData); | ||
|
||
const options = { | ||
protocol: 'https:', | ||
protocol: "https:", | ||
hostname: OPENHIM_CORE_SERVICE_NAME, | ||
port: OPENHIM_MEDIATOR_API_PORT, | ||
path: '/metadata', | ||
method: 'POST', | ||
path: "/metadata", | ||
method: "POST", | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Content-Length': data.length, | ||
Authorization: `Basic ${authHeader}` | ||
} | ||
} | ||
"Content-Type": "application/json", | ||
"Content-Length": data.length, | ||
Authorization: `Basic ${authHeader}`, | ||
}, | ||
}; | ||
|
||
const req = https.request(options, res => { | ||
const req = https.request(options, (res) => { | ||
if (res.statusCode == 401) { | ||
throw new Error(`Incorrect OpenHIM API credentials`) | ||
throw new Error(`Incorrect OpenHIM API credentials`); | ||
} | ||
|
||
if (res.statusCode != 201) { | ||
throw new Error(`Failed to import OpenHIM config: ${res.statusCode}`) | ||
throw new Error(`Failed to import OpenHIM config: ${res.statusCode}`); | ||
} | ||
|
||
console.log('Successfully Imported OpenHIM Config') | ||
}) | ||
console.log("Successfully Imported OpenHIM Config"); | ||
}); | ||
|
||
req.on('error', error => { | ||
console.error('Failed to import OpenHIM config: ', error) | ||
}) | ||
req.on("error", (error) => { | ||
console.error("Failed to import OpenHIM config: ", error); | ||
}); | ||
|
||
req.write(data) | ||
req.end() | ||
req.write(data); | ||
req.end(); |
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 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove redundant 'use strict' directive.
The
use strict
directive is unnecessary in ES6 modules as they are in strict mode by default.-"use strict";
Committable suggestion
Tools
Biome