From d85b729837f75ebb85bbbca906fe73aae4fd6706 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Fri, 15 Aug 2025 17:43:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(builder):=20=E6=96=B0=E5=A2=9Enodejs?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?golang=E6=8C=82=E8=BD=BD=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加nodejs的env.cfg配置文件及compose.yml模板 更新golang的compose.yml中volumes路径使用变量替换 --- builder/golang/compose.yml | 2 +- builder/nodejs/compose.yml | 13 +++++++++++++ builder/nodejs/env.cfg | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 builder/nodejs/compose.yml create mode 100644 builder/nodejs/env.cfg diff --git a/builder/golang/compose.yml b/builder/golang/compose.yml index 7bfd932..887dd8d 100644 --- a/builder/golang/compose.yml +++ b/builder/golang/compose.yml @@ -10,7 +10,7 @@ services: tty: true command: bash volumes: - - ${Volumes_Path}/mygits:/app + - ${Volumes_Path}/${PROJECT_NAME}:/app working_dir: /app environment: - GOPROXY=https://goproxy.cn,direct diff --git a/builder/nodejs/compose.yml b/builder/nodejs/compose.yml new file mode 100644 index 0000000..2c23976 --- /dev/null +++ b/builder/nodejs/compose.yml @@ -0,0 +1,13 @@ +# run:: docker compose -p memos --env-file ./builder/nodejs/env.cfg -f ./builder/nodejs/compose.yml up -d + +services: + + golang: + image: ${IMAGE_TAG_BASH} + container_name: "build-nodejs" + restart: always + tty: true + command: bash + volumes: + - ${Volumes_Path}/${PROJECT_NAME}:/app + working_dir: /app \ No newline at end of file diff --git a/builder/nodejs/env.cfg b/builder/nodejs/env.cfg new file mode 100644 index 0000000..a80b127 --- /dev/null +++ b/builder/nodejs/env.cfg @@ -0,0 +1,3 @@ +IMAGE_TAG_BASH=node:22.18.0-bookworm +IMAGE_TAG_ASH=node:22.18.0-alpine +Volumes_Path=/data/volumes \ No newline at end of file