forked from extern/podman-compose
do not merge command array
This commit is contained in:
parent
105c27c8dc
commit
1be41b46a5
@ -3,7 +3,12 @@
|
|||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
cp example.env local.env
|
cp example.local.env local.env
|
||||||
|
cp example.env .env
|
||||||
|
cat local.env
|
||||||
|
cat .env
|
||||||
|
echo "UID=$UID" >> .env
|
||||||
|
cat .env
|
||||||
podman-compose build
|
podman-compose build
|
||||||
podman-compose run --rm --no-deps init
|
podman-compose run --rm --no-deps init
|
||||||
podman-compose up
|
podman-compose up
|
||||||
|
@ -14,7 +14,8 @@ services:
|
|||||||
- /run
|
- /run
|
||||||
init:
|
init:
|
||||||
read_only: true
|
read_only: true
|
||||||
userns_mode: keep-id
|
#userns_mode: keep-id
|
||||||
|
user: ${UID:-1000}
|
||||||
build:
|
build:
|
||||||
context: ./containers/${NODE_IMG:-node16-runtime}
|
context: ./containers/${NODE_IMG:-node16-runtime}
|
||||||
image: ${NODE_IMG:-node16-runtime}
|
image: ${NODE_IMG:-node16-runtime}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
REDIS_HOST=redis
|
WEB_LISTEN_PORT=3000
|
||||||
|
# pass UID= your IDE user
|
||||||
|
|
||||||
|
@ -8,9 +8,9 @@ async function loop() {
|
|||||||
try {
|
try {
|
||||||
task_desc = JSON.parse(task_desc_s);
|
task_desc = JSON.parse(task_desc_s);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
proj.logger.exception(e);
|
console.exception(e);
|
||||||
}
|
}
|
||||||
proj.logger.info("got task "+task_desc.func);
|
console.info("got task "+task_desc.func);
|
||||||
const func = task_desc.func;
|
const func = task_desc.func;
|
||||||
const args = task_desc.args;
|
const args = task_desc.args;
|
||||||
if (typeof(proj.tasks[func])!="function") {
|
if (typeof(proj.tasks[func])!="function") {
|
||||||
|
@ -7,7 +7,6 @@ import express from "express";
|
|||||||
|
|
||||||
export async function start() {
|
export async function start() {
|
||||||
const app = express();
|
const app = express();
|
||||||
app.use(proj.logger.express_logger);
|
|
||||||
const server = http.createServer(app);
|
const server = http.createServer(app);
|
||||||
|
|
||||||
// Routing
|
// Routing
|
||||||
@ -17,6 +16,6 @@ export async function start() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
server.listen(proj.config.LISTEN_PORT, proj.config.LISTEN_HOST, function() {
|
server.listen(proj.config.LISTEN_PORT, proj.config.LISTEN_HOST, function() {
|
||||||
proj.logger.warn(`listening at port ${proj.config.LISTEN_PORT}`);
|
console.warn(`listening at port ${proj.config.LISTEN_PORT}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"cli": "nodemon -w lib -w index.js --es-module-specifier-resolution=node ./index.mjs"
|
"cli": "nodemon -w lib -w index.js --es-module-specifier-resolution=node ./index.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "~4.16.4",
|
"express": "~4.16.4",
|
||||||
|
@ -1167,6 +1167,9 @@ def rec_merge_one(target, source):
|
|||||||
if key not in source:
|
if key not in source:
|
||||||
continue
|
continue
|
||||||
value2 = source[key]
|
value2 = source[key]
|
||||||
|
if key == "command":
|
||||||
|
target[key] = value2
|
||||||
|
continue
|
||||||
if not isinstance(value2, type(value)):
|
if not isinstance(value2, type(value)):
|
||||||
value_type = type(value)
|
value_type = type(value)
|
||||||
value2_type = type(value2)
|
value2_type = type(value2)
|
||||||
|
Loading…
Reference in New Issue
Block a user