@rpcbase/server 0.43.0 → 0.44.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/bin.js CHANGED
@@ -14,11 +14,11 @@ const args = yargs(hideBin(process.argv))
14
14
  .command("start", "run server/infrastructure", () => {}, (argv) => {
15
15
  is_command = true
16
16
  console.log("run start server/infrastructure")
17
- start_server()
17
+ start_server(argv)
18
18
  })
19
19
  .command("ping", "ping", () => {}, (argv) => {
20
20
  is_command = true
21
- console.log("OING")
21
+ console.log("PING")
22
22
  })
23
23
  .option("verbose", {
24
24
  alias: "v",
package/cli/run_docker.js CHANGED
@@ -4,11 +4,12 @@ const path = require("path")
4
4
 
5
5
  const is_production = "yes" === process.env.INFRASTRUCTURE_IS_PRODUCTION
6
6
 
7
-
8
- const run_docker = async(infrastructure_dir, proj_prefix) => {
7
+ const run_docker = async(infrastructure_dir, proj_prefix, args) => {
9
8
  // env
10
9
  const env_path = path.relative(infrastructure_dir, path.join(process.cwd(), "./.env"))
11
10
 
11
+ console.log("ICI ARGS", args)
12
+
12
13
  // compose files
13
14
  const compose_files = ["-f common.yml"]
14
15
  if (is_production) compose_files.push("-f prod.yml")
@@ -16,6 +17,7 @@ const run_docker = async(infrastructure_dir, proj_prefix) => {
16
17
 
17
18
  const opts = ["--build", "--remove-orphans"]
18
19
  if (!is_production) opts.push("--abort-on-container-exit")
20
+ if (args.detach) opts.push("--detach")
19
21
 
20
22
  const cmd = `docker-compose --env-file ${env_path} -p ${proj_prefix} ${compose_files.join(" ")} up ${opts.join(" ")}`
21
23
 
@@ -10,7 +10,7 @@ const run_native = require("./run_native")
10
10
  // TODO: auto create network if necessary
11
11
  // docker network create local-network
12
12
 
13
- const start_server = async() => {
13
+ const start_server = async(args) => {
14
14
 
15
15
  const infrastructure_dir = path.join(process.cwd(), "../infrastructure")
16
16
 
@@ -24,7 +24,7 @@ const start_server = async() => {
24
24
  if (runtime === "native") {
25
25
  run_native(infrastructure_dir, proj_prefix)
26
26
  } else {
27
- run_docker(infrastructure_dir, proj_prefix)
27
+ run_docker(infrastructure_dir, proj_prefix, args)
28
28
  }
29
29
 
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {