diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..38f6a31 --- /dev/null +++ b/.drone.yml @@ -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 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3b9bd9b --- /dev/null +++ b/Dockerfile @@ -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 \ No newline at end of file diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 0000000..c754733 --- /dev/null +++ b/docker/nginx.conf @@ -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; + } +} \ No newline at end of file