Skip to content

Commit

Permalink
build: Update config overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
maeek committed Dec 19, 2021
1 parent db9f1af commit 7976a1e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**/.git
**/node_modules
**/dist
**/docs
**/deploy
**/config
**/.vscode
**/tools
**/*.log
2 changes: 1 addition & 1 deletion config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');

module.exports = {
// Build mode: 'development' or 'production'
mode: process.env.NODE_ENV,
mode: process.env.NODE_ENV || 'production',
// The base directory (absolute path!) for resolving the entry option
basePath: path.resolve(__dirname, '..'),
// Services folder
Expand Down
1 change: 0 additions & 1 deletion production/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
},
"dockerBuildOptions": {
"buildArgs": [
"--build-arg",
"TEST_ARG=test"
]
}
Expand Down
2 changes: 1 addition & 1 deletion production/gateway/src/services/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class ConfigService {
constructor() {
this.envConfig = {};
this.envConfig.port = process.env.API_PORT;

this.envConfig.exampleService = {
options: {
port: process.env.API_PORT,
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/lib/Builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class Builder extends Command {
`${this.config.realDockerfilePath ? this.config.realDockerfilePath : this.config.dockerfilePath}`,
'--build-arg',
`SERVICE_NAME=${this.name}`,
...(conf.buildArgs || []),
...(conf.environment || []),
...(conf.buildArgs || []).map(arg => ['--build-arg', arg]).flat(Infinity),
...(conf.environment || []).map(env => ['-e', env]).flat(Infinity),
'-t',
`${this.config.tag}`,
'production/'
Expand Down
Empty file removed tools/new-service.js
Empty file.

0 comments on commit 7976a1e

Please sign in to comment.