From 9d51bf0357d5aa4a28d6f3543499765a0ead13cc Mon Sep 17 00:00:00 2001 From: naicoi Date: Thu, 18 May 2023 00:43:00 +0700 Subject: [PATCH] Add Woodpecker configuration and Dockerfile for Node.js app deployment Added a .woodpecker.yml file to configure the build matrix, pipeline, and Docker image settings for deploying a Node.js app. Also added a Dockerfile that installs pm2 and typescript globally. --- .woodpecker.yml | 27 +++++++++++++++++++++++++++ Dockerfile | 4 ++++ 2 files changed, 31 insertions(+) create mode 100644 .woodpecker.yml create mode 100644 Dockerfile diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..2c51943 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,27 @@ +matrix: + platform: + - linux/amd64 + - linux/arm64 + os: + - alpine + - ubuntu + version: + - 16 + - 18 + - 20 + +platform: ${platform} + +pipeline: + build: + image: plugins/docker + settings: + registry: techio.dev + repo: techio.dev/${CI_REPO} + tags: + - ${version}-${os} + build_args: + - tag=${version}-${os} + username: deploy + password: + from_secret: deploy_password diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..67a1dc6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +ARG tag=18-alpine +FROM node:${image} +RUN yarn global add pm2 +RUN pm2 install typescript \ No newline at end of file