This commit is contained in:
parent
c7dabda145
commit
21bb235a3f
35
.drone.yml
35
.drone.yml
@ -3,9 +3,10 @@ type: kubernetes
|
||||
name: Harbor
|
||||
|
||||
steps:
|
||||
- name: build & publish
|
||||
- name: 'Lowdefy: build & publish'
|
||||
depends_on: [ clone ]
|
||||
image: plugins/docker
|
||||
context: .
|
||||
context: ./Lowdefy
|
||||
settings:
|
||||
repo: bv11-cr01.bessems.eu/library/lowdefy
|
||||
registry: bv11-cr01.bessems.eu
|
||||
@ -15,6 +16,19 @@ steps:
|
||||
from_secret: harbor_username
|
||||
password:
|
||||
from_secret: harbor_password
|
||||
- name: 'Fastify: build & publish'
|
||||
depends_on: [ clone ]
|
||||
image: plugins/docker
|
||||
context: ./Fastify
|
||||
settings:
|
||||
repo: bv11-cr01.bessems.eu/library/fastify
|
||||
registry: bv11-cr01.bessems.eu
|
||||
mtu: 1450
|
||||
tags: latest
|
||||
username:
|
||||
from_secret: harbor_username
|
||||
password:
|
||||
from_secret: harbor_password
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@ -22,9 +36,10 @@ type: kubernetes
|
||||
name: Dockerhub
|
||||
|
||||
steps:
|
||||
- name: build & publish
|
||||
- name: 'Lowdefy: build & publish'
|
||||
depends_on: [ clone ]
|
||||
image: plugins/docker
|
||||
context: .
|
||||
context: ./Lowdefy
|
||||
settings:
|
||||
repo: djpbessems/lowdefy
|
||||
mtu: 1450
|
||||
@ -33,3 +48,15 @@ steps:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
- name: 'Fastify: build & publish'
|
||||
depends_on: [ clone ]
|
||||
image: plugins/docker
|
||||
context: ./Fastify
|
||||
settings:
|
||||
repo: djpbessems/fastify
|
||||
mtu: 1450
|
||||
tags: latest
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
7
Fastify/Dockerfile
Normal file
7
Fastify/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM node:17-alpine
|
||||
|
||||
RUN npm install fastify
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["node", "server.js"]
|
18
Fastify/server.js
Normal file
18
Fastify/server.js
Normal file
@ -0,0 +1,18 @@
|
||||
// Require the framework and instantiate it
|
||||
const fastify = require('fastify')({ logger: true })
|
||||
|
||||
// Declare a route
|
||||
fastify.get('/', async (request, reply) => {
|
||||
return { hello: 'world' }
|
||||
})
|
||||
|
||||
// Run the server!
|
||||
const start = async () => {
|
||||
try {
|
||||
await fastify.listen(3001)
|
||||
} catch (err) {
|
||||
fastify.log.error(err)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
start()
|
@ -1,4 +1,5 @@
|
||||
FROM node:14-buster AS build
|
||||
# FROM node:14-buster AS build
|
||||
FROM node:17-alpine AS build
|
||||
|
||||
# Set working directory and node user
|
||||
WORKDIR /home/node/lowdefy
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Reference in New Issue
Block a user