@rpcbase/server 0.245.0 → 0.247.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/run_docker.js +15 -2
- package/package.json +1 -1
package/cli/run_docker.js
CHANGED
|
@@ -3,7 +3,9 @@ const {execSync} = require("child_process")
|
|
|
3
3
|
const path = require("path")
|
|
4
4
|
const fs = require("fs")
|
|
5
5
|
|
|
6
|
+
// TODO: this should be NODE_ENV, remove INFRASTRUCTURE_IS_PRODUCTION
|
|
6
7
|
const is_production = "yes" === process.env.INFRASTRUCTURE_IS_PRODUCTION
|
|
8
|
+
const is_ci = process.env.CI === "true"
|
|
7
9
|
|
|
8
10
|
const run_docker = async(infrastructure_dir, proj_prefix, args) => {
|
|
9
11
|
// env
|
|
@@ -26,8 +28,19 @@ const run_docker = async(infrastructure_dir, proj_prefix, args) => {
|
|
|
26
28
|
compose_files.push("-f", "dev.yml")
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
if (is_ci) {
|
|
32
|
+
console.log("CI==true, will skip docker build")
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const opts = [
|
|
36
|
+
is_ci ? "--no-build" : "--build",
|
|
37
|
+
is_ci && "--no-recreate",
|
|
38
|
+
/*"--quiet-pull",*/
|
|
39
|
+
"--remove-orphans",
|
|
40
|
+
"--force-recreate",
|
|
41
|
+
!is_production && "--abort-on-container-exit",
|
|
42
|
+
].filter(Boolean)
|
|
43
|
+
|
|
31
44
|
|
|
32
45
|
const cmd = "docker compose"
|
|
33
46
|
const cmd_args = ["--env-file", base_env_path, "--env-file", env_path, "-p", proj_prefix, ...compose_files, "up", ...opts]
|