docker: Fix build by generating artifacts

This commit is contained in:
Elian Doran 2024-07-13 11:40:52 +03:00
parent 60d134a89b
commit d18bfb9d69
No known key found for this signature in database
5 changed files with 11 additions and 3 deletions

View File

@ -5,3 +5,5 @@
/docs
/npm-debug.log
node_modules
src/**/*.ts

View File

@ -21,6 +21,10 @@ COPY . .
COPY server-package.json package.json
# Copy TypeScript build artifacts into the original directory structure.
RUN ls
RUN cp -R build/src/* src/.
# Install app dependencies
RUN set -x \
&& npm install \

View File

@ -5,6 +5,9 @@ SERIES=${VERSION:0:4}-latest
cat package.json | grep -v electron > server-package.json
echo "Compiling typescript..."
npx tsc
sudo docker build -t zadam/trilium:$VERSION --network host -t zadam/trilium:$SERIES .
if [[ $VERSION != *"beta"* ]]; then

View File

@ -13,8 +13,7 @@
},
"include": [
"./src/**/*.js",
"./src/**/*.ts",
"./*.ts"
"./src/**/*.ts"
],
"exclude": ["./node_modules/**/*"],
"ts-node": {

View File

@ -4,7 +4,7 @@ const assetPath = require('./src/services/asset_path');
module.exports = {
mode: 'production',
entry: {
setup: './src/public/app/setup.ts',
setup: './src/public/app/setup.js',
mobile: './src/public/app/mobile.js',
desktop: './src/public/app/desktop.js',
},