Add docker build

This commit is contained in:
Kieran 2024-08-08 13:37:20 +01:00
parent 8e63aa8b30
commit baec1247fb
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941
4 changed files with 39 additions and 1 deletions

10
.dockerignore Normal file
View File

@ -0,0 +1,10 @@
node_modules
dist
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

21
.drone.yaml Normal file
View File

@ -0,0 +1,21 @@
---
kind: pipeline
type: kubernetes
name: default
metadata:
namespace: git
steps:
- name: build
image: docker
privileged: true
environment:
TOKEN:
from_secret: registry_token
commands:
- dockerd &
- docker login -u registry -p $TOKEN registry.v0l.io
- docker build -t registry.v0l.io/lnvps-web:latest .
- docker push registry.v0l.io/lnvps-web:latest
- kill $(cat /var/run/docker.pid)

1
.gitignore vendored
View File

@ -23,7 +23,6 @@ dist-ssr
*.sln *.sln
*.sw? *.sw?
.pnp.* .pnp.*
.yarn/* .yarn/*
!.yarn/patches !.yarn/patches

View File

@ -0,0 +1,8 @@
FROM node:bookworm as builder
WORKDIR /src
COPY . .
RUN yarn && yarn build
FROM nginx as runner
WORKDIR /usr/share/nginx/html
COPY --from=builder /src/dist .