Skip to content

Commit

Permalink
add sql docker files.
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Oct 21, 2022
1 parent b8316f9 commit f28b119
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions generators/server/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
const cleanup = require('generator-jhipster/generators/cleanup');
const constants = require('generator-jhipster/generators/generator-constants');
const jhipsterFiles = require('generator-jhipster/generators/server/files').serverFiles;
let { serverFiles: sqlServerFiles } = require('generator-jhipster/generators/server/files-sql');
const { addSectionsCondition } = require('generator-jhipster/generators/utils');

sqlServerFiles = addSectionsCondition(sqlServerFiles, data => data.databaseTypeSql);

/* Constants use throughout */
const INTERPOLATE_REGEX = constants.INTERPOLATE_REGEX;
Expand Down Expand Up @@ -640,7 +644,7 @@ const serverFiles = {
};

const serverFilesFromJHipster = {
docker: jhipsterFiles.docker,
docker: [...jhipsterFiles.docker, ...sqlServerFiles.docker],
npmWrapper: [
{
condition: generator => generator.buildTool === 'maven',
Expand Down Expand Up @@ -703,7 +707,7 @@ function writeFiles() {

async writeFiles() {
await this.writeFilesToDisk(serverFiles, this, false, 'quarkus');
await this.writeFilesToDisk(serverFilesFromJHipster, this, false, this.fetchFromInstalledJHipster('server/templates'));
await this.writeFilesToDisk(serverFilesFromJHipster, this, false, ['', 'sql/reactive', 'sql/common']);
},
};
}
Expand Down
3 changes: 3 additions & 0 deletions test/__snapshots__/server.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,9 @@ exports[`Subgenerator server of quarkus JHipster blueprint With monolith Maven M
"src/main/docker/monitoring.yml": {
"stateCleared": "modified",
},
"src/main/docker/mysql.yml": {
"stateCleared": "modified",
},
"src/main/docker/prometheus/prometheus.yml": {
"stateCleared": "modified",
},
Expand Down

0 comments on commit f28b119

Please sign in to comment.