feat: build site outside docker
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Kieran 2023-05-17 11:19:51 +01:00
parent 8f4c0f49ec
commit f4f80b3e57
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
3 changed files with 15 additions and 9 deletions

View File

@ -1,8 +0,0 @@
**/node_modules/
.github/
.vscode/
**/build/
yarn-error.log
.husky/
.git/
**/dist/

View File

@ -49,6 +49,16 @@ trigger:
metadata:
namespace: git
steps:
- 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
@ -65,7 +75,7 @@ steps:
--platform linux/amd64,linux/arm64 \
--cache-from "type=local,src=/cache" \
--cache-to "type=local,dest=/cache" \
.
-f Dockerfile.prebuilt .
- img push git.v0l.io/kieran/snort:latest
volumes:
- name: cache

4
Dockerfile.prebuilt Normal file
View File

@ -0,0 +1,4 @@
FROM nginx:mainline-alpine
COPY packages/app/build /usr/share/nginx/html
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/packages/app/build /usr/share/nginx/html