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 /docs
/npm-debug.log /npm-debug.log
node_modules node_modules
src/**/*.ts

View File

@ -21,6 +21,10 @@ COPY . .
COPY server-package.json package.json 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 # Install app dependencies
RUN set -x \ RUN set -x \
&& npm install \ && npm install \

View File

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

View File

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

View File

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