Skip to content

Commit

Permalink
Don't generate certs if not using ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Oct 9, 2024
1 parent f0f366f commit 9429a2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/elasticsearch-docker-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.*
#dotnet-quality: preview
dotnet-quality: preview
- name: Build Reason
env:
GITHUB_EVENT: ${{ toJson(github) }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FROM build AS api-publish
WORKDIR /app/src/Exceptionless.Web

RUN apt-get update -yq
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -yq nodejs
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -yq nodejs

RUN dotnet publish -c Release -o out /p:SkipSpaPublish=true

Expand All @@ -70,7 +70,7 @@ FROM build AS app-publish
WORKDIR /app/src/Exceptionless.Web

RUN apt-get update -yq
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -yq nodejs
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -yq nodejs

RUN dotnet publish -c Release -o out

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ var s = require("child_process");
var proxyRequest = require("grunt-connect-proxy2/lib/utils").proxyRequest;

module.exports = function () {
var certs = generateCerts();
var target = getTarget();
var certs = target.ssl ? generateCerts() : { cert: undefined, key: undefined };

return {
main: {
Expand Down Expand Up @@ -87,15 +87,6 @@ function getTarget() {

/** Function taken from aspnetcore-https.js in ASP.NET React template https://github.com/microsoft/commercial-marketplace-offer-deploy/blob/main/src/ClientApp/ClientApp/aspnetcore-https.ts */
function generateCerts() {
if (process.env.CI) {
// eslint-disable-next-line no-console
console.warn("Skipping certificate generation in CI environment.");
return {
cert: undefined,
key: undefined,
};
}

var baseFolder =
process.env.APPDATA !== undefined && process.env.APPDATA !== ""
? `${process.env.APPDATA}/ASP.NET/https`
Expand Down

0 comments on commit 9429a2b

Please sign in to comment.