mirror of
https://git.v0l.io/Kieran/dtan.git
synced 2024-12-12 15:06:22 +00:00
feat: docker builds
This commit is contained in:
parent
31f898bf90
commit
faef2b5969
44
.drone.yml
Normal file
44
.drone.yml
Normal file
@ -0,0 +1,44 @@
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: docker
|
||||
concurrency:
|
||||
limit: 1
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
metadata:
|
||||
namespace: git
|
||||
steps:
|
||||
- name: Fetch tags
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git fetch --tags
|
||||
- name: Build site
|
||||
image: node:current-bullseye
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
environment:
|
||||
YARN_CACHE_FOLDER: /cache/.yarn-docker
|
||||
commands:
|
||||
- yarn install
|
||||
- yarn build
|
||||
- name: build docker image
|
||||
image: r.j3ss.co/img
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
environment:
|
||||
TOKEN:
|
||||
from_secret: docker_hub
|
||||
commands:
|
||||
- img login -u voidic -p $TOKEN
|
||||
- img build -t voidic/dtan:latest --platform linux/amd64,linux/arm64 .
|
||||
- img push voidic/dtan:latest
|
||||
volumes:
|
||||
- name: cache
|
||||
claim:
|
||||
name: docker-cache
|
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM nginxinc/nginx-unprivileged:mainline-alpine
|
||||
COPY dist /usr/share/nginx/html
|
||||
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
10
docker/nginx.conf
Normal file
10
docker/nginx.conf
Normal file
@ -0,0 +1,10 @@
|
||||
server {
|
||||
listen 8080 default_server;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user