Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from vue-cli to vite #1026

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Use VITE_ prefix in version and docker builds
  • Loading branch information
ml-evs committed Jan 11, 2025
commit 6beee74105bfd04aaeb52d79e5426b58cc76715d
16 changes: 8 additions & 8 deletions .docker/app_dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ ENV NODE_ENV=production

# These get replaced by the entrypoint script for production builds.
# Set the real values in `.env` files or an external docker-compose.
ARG VUE_APP_API_URL=magic-api-url
ARG VUE_APP_LOGO_URL=magic-logo-url
ARG VUE_APP_HOMEPAGE_URL=magic-homepage-url
ARG VUE_APP_EDITABLE_INVENTORY=magic-setting
ARG VUE_APP_WEBSITE_TITLE=magic-title
ARG VUE_APP_QR_CODE_RESOLVER_URL=magic-qr-code-resolver-url
ARG VUE_APP_AUTOMATICALLY_GENERATE_ID_DEFAULT=magic-generate-id-setting
ARG VITE_APP_API_URL=magic-api-url
ARG VITE_APP_LOGO_URL=magic-logo-url
ARG VITE_APP_HOMEPAGE_URL=magic-homepage-url
ARG VITE_APP_EDITABLE_INVENTORY=magic-setting
ARG VITE_APP_WEBSITE_TITLE=magic-title
ARG VITE_APP_QR_CODE_RESOLVER_URL=magic-qr-code-resolver-url
ARG VITE_APP_AUTOMATICALLY_GENERATE_ID_DEFAULT=magic-generate-id-setting

COPY webapp ./
RUN --mount=type=bind,target=/.git,src=./.git VUE_APP_GIT_VERSION=$(node scripts/get-version.js) /node_modules/.bin/vue-cli-service build
RUN --mount=type=bind,target=/.git,src=./.git VITE_APP_GIT_VERSION=$(node scripts/get-version.js) /node_modules/.bin/vite build

FROM node:20-bullseye AS production

Expand Down
6 changes: 3 additions & 3 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "0.0.0-git",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"dev": "VITE_APP_GIT_VERSION=$(node scripts/get-version.js) vite",
"build": "VITE_APP_GIT_VERSION=$(node scripts/get-version.js) vite build",
"preview": "VITE_APP_GIT_VERSION=$(node scripts/get-version.js) vite preview"
},
"dependencies": {
"@bokeh/bokehjs": "^2.4.0",
Expand Down
Loading