commit 4ba52d63cacd25692e56fd3d81d5c751fcca805a Author: wanggang <76527413@qq.com> Date: Wed Jun 2 11:52:58 2021 +0800 init diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..4ef258f --- /dev/null +++ b/.drone.yml @@ -0,0 +1,25 @@ +kind: pipeline +type: docker +name: default +platform: + arch: amd64 + os: linux +steps: + - name: test + image: node:16.2.0 + commands: + - node -v + - npm -v + - yarn --version + - yarn install + - yarn run test + - name: publish + image: plugins/docker:19.03.8 + environment: + PLUGIN_REGISTRY: 192.168.100.144:5000 + PLUGIN_REPO: 192.168.100.144:5000/node/example + settings: + insecure: true + tags: + - latest + - ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..710ea20 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:16.2.0 +EXPOSE 8080 +WORKDIR /app + +ADD app.js /app/ +ADD node_modules /app/node_modules + +CMD [ "node", "app.js" ] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fe1ef12 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# example + diff --git a/app.js b/app.js new file mode 100644 index 0000000..7c3597f --- /dev/null +++ b/app.js @@ -0,0 +1,19 @@ +const express = require("express"); +const app = express(); +const port = process.env.PORT || 8080; + +app.get("/", (req, res) => { + res.send( + "