Skip to content

Commit 1be41b4

Browse files
do not merge command array
1 parent 105c27c commit 1be41b4

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

examples/nodeproj/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33

44

55
```
6-
cp example.env local.env
6+
cp example.local.env local.env
7+
cp example.env .env
8+
cat local.env
9+
cat .env
10+
echo "UID=$UID" >> .env
11+
cat .env
712
podman-compose build
813
podman-compose run --rm --no-deps init
914
podman-compose up

examples/nodeproj/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ services:
1414
- /run
1515
init:
1616
read_only: true
17-
userns_mode: keep-id
17+
#userns_mode: keep-id
18+
user: ${UID:-1000}
1819
build:
1920
context: ./containers/${NODE_IMG:-node16-runtime}
2021
image: ${NODE_IMG:-node16-runtime}

examples/nodeproj/example.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
REDIS_HOST=redis
1+
WEB_LISTEN_PORT=3000
2+
# pass UID= your IDE user
23

examples/nodeproj/lib/commands/task.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ async function loop() {
88
try {
99
task_desc = JSON.parse(task_desc_s);
1010
} catch (e) {
11-
proj.logger.exception(e);
11+
console.exception(e);
1212
}
13-
proj.logger.info("got task "+task_desc.func);
13+
console.info("got task "+task_desc.func);
1414
const func = task_desc.func;
1515
const args = task_desc.args;
1616
if (typeof(proj.tasks[func])!="function") {

examples/nodeproj/lib/commands/web.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import express from "express";
77

88
export async function start() {
99
const app = express();
10-
app.use(proj.logger.express_logger);
1110
const server = http.createServer(app);
1211

1312
// Routing
@@ -17,6 +16,6 @@ export async function start() {
1716
});
1817

1918
server.listen(proj.config.LISTEN_PORT, proj.config.LISTEN_HOST, function() {
20-
proj.logger.warn(`listening at port ${proj.config.LISTEN_PORT}`);
19+
console.warn(`listening at port ${proj.config.LISTEN_PORT}`);
2120
});
2221
}

examples/nodeproj/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"main": "index.js",
1010
"type": "module",
1111
"scripts": {
12-
"cli": "nodemon -w lib -w index.js --es-module-specifier-resolution=node ./index.mjs"
12+
"cli": "nodemon -w lib -w index.js --es-module-specifier-resolution=node ./index.js"
1313
},
1414
"dependencies": {
1515
"express": "~4.16.4",

podman_compose.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,9 @@ def rec_merge_one(target, source):
11671167
if key not in source:
11681168
continue
11691169
value2 = source[key]
1170+
if key == "command":
1171+
target[key] = value2
1172+
continue
11701173
if not isinstance(value2, type(value)):
11711174
value_type = type(value)
11721175
value2_type = type(value2)

0 commit comments

Comments
 (0)