feat: build site outside docker
This commit is contained in:
parent
8f4c0f49ec
commit
f4f80b3e57
@ -1,8 +0,0 @@
|
|||||||
**/node_modules/
|
|
||||||
.github/
|
|
||||||
.vscode/
|
|
||||||
**/build/
|
|
||||||
yarn-error.log
|
|
||||||
.husky/
|
|
||||||
.git/
|
|
||||||
**/dist/
|
|
12
.drone.yml
12
.drone.yml
@ -49,6 +49,16 @@ trigger:
|
|||||||
metadata:
|
metadata:
|
||||||
namespace: git
|
namespace: git
|
||||||
steps:
|
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
|
- name: build docker image
|
||||||
image: r.j3ss.co/img
|
image: r.j3ss.co/img
|
||||||
privileged: true
|
privileged: true
|
||||||
@ -65,7 +75,7 @@ steps:
|
|||||||
--platform linux/amd64,linux/arm64 \
|
--platform linux/amd64,linux/arm64 \
|
||||||
--cache-from "type=local,src=/cache" \
|
--cache-from "type=local,src=/cache" \
|
||||||
--cache-to "type=local,dest=/cache" \
|
--cache-to "type=local,dest=/cache" \
|
||||||
.
|
-f Dockerfile.prebuilt .
|
||||||
- img push git.v0l.io/kieran/snort:latest
|
- img push git.v0l.io/kieran/snort:latest
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache
|
- name: cache
|
||||||
|
4
Dockerfile.prebuilt
Normal file
4
Dockerfile.prebuilt
Normal 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
|
Loading…
x
Reference in New Issue
Block a user