Merge pull request 'bugfix/31-env-js-linking-ci' (#41) from bugfix/31-env-js-linking-ci into dev
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #41
close #31
This commit is contained in:
Philipp Dormann 2021-04-13 16:02:44 +00:00
commit 75b4dac0fe
3 changed files with 58 additions and 50 deletions

View File

@ -3,6 +3,7 @@ WORKDIR /app
COPY . . COPY . .
RUN yarn RUN yarn
RUN yarn build RUN yarn build
RUN yarn postbuild
# final image # final image
FROM fholzer/nginx-brotli:v1.19.1 FROM fholzer/nginx-brotli:v1.19.1
COPY --from=0 /app/dist /usr/share/nginx/html COPY --from=0 /app/dist /usr/share/nginx/html

6
env_fix.js Normal file
View File

@ -0,0 +1,6 @@
const fs = require('fs');
if (fs.existsSync('./dist/index.html')) {
const content = fs.readFileSync('./dist/index.html', { encoding: 'utf8' });
const newcontent = content.replace(`"/env.js"`, `"./env.js"`);
fs.writeFileSync('./dist/index.html', newcontent);
}

View File

@ -1,50 +1,51 @@
{ {
"name": "@odit/lfk-selfservice", "name": "@odit/lfk-selfservice",
"version": "0.7.0", "version": "0.7.0",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"release": "release-it --only-version" "release": "release-it --only-version",
}, "postbuild": "node env_fix.js"
"dependencies": { },
"marked": "2.0.1", "dependencies": {
"redaxios": "0.4.1", "marked": "2.0.3",
"toastify-js": "1.10.0", "redaxios": "0.4.1",
"validator": "13.5.2", "toastify-js": "1.10.0",
"vue-i18n": "9.0.0", "validator": "13.5.2",
"vue-toastification": "2.0.0-rc.1", "vue-i18n": "9.1.4",
"vue": "3.0.9", "vue-toastification": "2.0.0-rc.1",
"vue-router": "4.0.5" "vue": "3.0.9",
}, "vue-router": "4.0.5"
"devDependencies": { },
"@tailwindcss/jit": "0.1.18", "devDependencies": {
"@tailwindcss/aspect-ratio": "0.2.0", "@tailwindcss/jit": "0.1.18",
"@tailwindcss/forms": "0.3.2", "@tailwindcss/aspect-ratio": "0.2.0",
"@tailwindcss/line-clamp": "0.2.0", "@tailwindcss/forms": "0.3.2",
"@tailwindcss/typography": "0.4.0", "@tailwindcss/line-clamp": "0.2.0",
"@vitejs/plugin-vue": "1.2.1", "@tailwindcss/typography": "0.4.0",
"@vue/compiler-sfc": "3.0.10", "@vitejs/plugin-vue": "1.2.1",
"autoprefixer": "10.2.5", "@vue/compiler-sfc": "3.0.11",
"tailwindcss": "2.0.4", "autoprefixer": "10.2.5",
"release-it": "14.5.0", "tailwindcss": "2.1.1",
"vite": "2.1.5" "release-it": "14.6.1",
}, "vite": "2.1.5"
"release-it": { },
"git": { "release-it": {
"commit": true, "git": {
"requireCleanWorkingDir": false, "commit": true,
"commitMessage": "🚀Bumped version to v${version}", "requireCleanWorkingDir": false,
"requireBranch": "dev", "commitMessage": "🚀Bumped version to v${version}",
"push": false, "requireBranch": "dev",
"tag": true, "push": false,
"tagName": null, "tag": true,
"tagAnnotation": "v${version}" "tagName": null,
}, "tagAnnotation": "v${version}"
"npm": { },
"publish": false "npm": {
}, "publish": false
"hooks": { },
"after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order_i18n.js && git add src/locales" "hooks": {
} "after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order_i18n.js && git add src/locales"
} }
} }
}