Build without docker in docker

This commit is contained in:
Elara 2023-08-16 12:00:43 -07:00
parent c2dec3db36
commit bd9a6c09ea
7 changed files with 23 additions and 30 deletions

View File

@ -1,6 +1,7 @@
.DS_Store .DS_Store
node_modules node_modules
/build /build
/app
/.svelte-kit /.svelte-kit
/package /package
.env .env

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
.DS_Store .DS_Store
node_modules node_modules
/build /build
/app
/.svelte-kit /.svelte-kit
/package /package
.env .env

View File

@ -1,6 +1,7 @@
.DS_Store .DS_Store
node_modules node_modules
/build /build
/app
/.svelte-kit /.svelte-kit
/package /package
.env .env

View File

@ -1,18 +1,24 @@
platform: linux/amd64 platform: linux/amd64
steps: steps:
build:
image: gitea.elara.ws/elara6331/node
environment:
- LURE_WEB_API_URL=https://api.lure.elara.ws
commands:
- npm i
- npm run build
- tar czf app.tar.gz app/
publish: publish:
image: woodpeckerci/plugin-docker-buildx image: gcr.io/go-containerregistry/crane
secrets: [docker_username, docker_password] secrets: [ registry_password ]
settings: commands:
repo: elara6331/lure-web - crane auth login gitea.elara.ws -u Elara6331 -p "$${REGISTRY_PASSWORD}"
dockerfile: docker/Dockerfile - crane append -b gitea.elara.ws/elara6331/node -f app.tar.gz -t gitea.elara.ws/elara6331/lure-web:amd64 --platform=linux/amd64
platforms: linux/amd64,linux/arm64 - crane append -b gitea.elara.ws/elara6331/node -f app.tar.gz -t gitea.elara.ws/elara6331/lure-web:arm64 --platform=linux/arm64
build_args: api_url=https://api.lure.elara.ws - crane append -b gitea.elara.ws/elara6331/node -f app.tar.gz -t gitea.elara.ws/elara6331/lure-web:riscv64 --platform=linux/riscv64
tag: latest - crane index -m gitea.elara.ws/elara6331/lure-web:amd64 -m gitea.elara.ws/elara6331/lure-web:arm64 -m gitea.elara.ws/elara6331/lure-web:riscv64 -t gitea.elara.ws/elara6331/lure-web:latest
when:
branch: public
event: push
deploy: deploy:
image: loq9/drone-nomad image: loq9/drone-nomad
secrets: [lure_api_github_secret] secrets: [lure_api_github_secret]
@ -22,6 +28,3 @@ steps:
environment: environment:
- PLUGIN_WATCH_DEPLOYMENT=true - PLUGIN_WATCH_DEPLOYMENT=true
- PLUGIN_WATCH_DEPLOYMENT_TIMEOUT=10m - PLUGIN_WATCH_DEPLOYMENT_TIMEOUT=10m
when:
branch: public
event: push

View File

@ -1,13 +0,0 @@
FROM node:19-alpine
ARG api_url
ENV LURE_WEB_API_URL $api_url
RUN apk add git
RUN git clone https://gitea.elara.ws/Elara6331/lure-web
RUN cd lure-web && \
npm i && \
npm run build
WORKDIR /lure-web
ENTRYPOINT node build

View File

@ -16,7 +16,7 @@ const config = {
], ],
kit: { kit: {
adapter: adapter(), adapter: adapter({out: 'app',}),
env: { env: {
publicPrefix: "LURE_WEB_" publicPrefix: "LURE_WEB_"
}, },

View File

@ -52,7 +52,7 @@ job "lure-web" {
driver = "docker" driver = "docker"
config { config {
image = "elara6331/lure-web:latest" image = "gitea.elara.ws/elara6331/lure-web:latest"
ports = ["http"] ports = ["http"]
} }