Compare commits

..

6 Commits

Author SHA1 Message Date
zadam
46fdd15857 release 0.57.3 2022-12-02 22:44:40 +01:00
zadam
42cd333694 clarification on the 5 minute sync auth leeway 2022-12-02 22:12:07 +01:00
zadam
aaa69f696b Merge remote-tracking branch 'origin/master' 2022-12-02 22:07:41 +01:00
zadam
8ce9dcf4aa fix webmanifest and robots.txt 2022-12-02 22:06:18 +01:00
zadam
130ded91ff Merge pull request #3375 from DynamoFox/fix-dockerfile-to-generate-webpack-bundle
Fix missing webpack bundle generation in Docker container build
2022-12-02 21:09:50 +01:00
DynamoFox
851465da62 Fix missing webpack bundle generation in Docker container build 2022-12-02 18:15:03 +01:00
6 changed files with 19 additions and 15 deletions

View File

@@ -4,6 +4,9 @@ FROM node:16.18.0-alpine
# Create app directory
WORKDIR /usr/src/app
# Bundle app source
COPY . .
COPY server-package.json package.json
# Install app dependencies
@@ -18,20 +21,19 @@ RUN set -x \
nasm \
libpng-dev \
python3 \
&& npm install --production \
&& apk del .build-dependencies
&& npm install \
&& apk del .build-dependencies \
&& npm run webpack \
&& npm prune --omit=dev \
# Set the path to the newly created webpack bundle
&& sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' src/views/desktop.ejs \
&& sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' src/views/mobile.ejs \
&& sed -i -e 's/app\/setup.js/app-dist\/setup.js/g' src/views/setup.ejs \
&& sed -i -e 's/app\/share.js/app-dist\/share.js/g' src/views/share/*.ejs
# Some setup tools need to be kept
RUN apk add --no-cache su-exec shadow
# Bundle app source
COPY . .
RUN sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' src/views/desktop.ejs && \
sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' src/views/mobile.ejs && \
sed -i -e 's/app\/setup.js/app-dist\/setup.js/g' src/views/setup.ejs && \
sed -i -e 's/app\/share.js/app-dist\/share.js/g' src/views/share/*.ejs
# Add application user and setup proper volume permissions
RUN adduser -s /bin/false node; exit 0

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "trilium",
"version": "0.56.2",
"version": "0.57.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "trilium",
"version": "0.56.2",
"version": "0.57.2",
"hasInstallScript": true,
"license": "AGPL-3.0-only",
"dependencies": {

View File

@@ -2,7 +2,7 @@
"name": "trilium",
"productName": "Trilium Notes",
"description": "Trilium Notes",
"version": "0.57.2",
"version": "0.57.3",
"license": "AGPL-3.0-only",
"main": "electron.js",
"bin": {

View File

@@ -52,6 +52,8 @@ app.use(`/node_modules/@excalidraw/excalidraw/dist/`, express.static(path.join(_
app.use(`/${assetPath}/node_modules/@excalidraw/excalidraw/dist/`, express.static(path.join(__dirname, '..', 'node_modules/@excalidraw/excalidraw/dist/')));
app.use(`/${assetPath}/images`, express.static(path.join(__dirname, '..', 'images')));
app.use(`/assets/vX/images`, express.static(path.join(__dirname, '..', 'images')));
app.use(`/manifest.webmanifest`, express.static(path.join(__dirname, 'public/manifest.webmanifest')));
app.use(`/robots.txt`, express.static(path.join(__dirname, 'public/robots.txt')));
const sessionParser = session({
secret: sessionSecret,
resave: false, // true forces the session to be saved back to the session store, even if the session was never modified during the request.

View File

@@ -26,7 +26,7 @@ function loginSync(req) {
// login token is valid for 5 minutes
if (Math.abs(timestamp.getTime() - now.getTime()) > 5 * 60 * 1000) {
return [401, { message: 'Auth request time is out of sync, please check that both client and server have correct time.' }];
return [401, { message: 'Auth request time is out of sync, please check that both client and server have correct time. The difference between clocks has to be smaller than 5 minutes.' }];
}
const syncVersion = req.body.syncVersion;

View File

@@ -1 +1 @@
module.exports = { buildDate:"2022-12-01T22:56:29+01:00", buildRevision: "36c98e919aa5d4bd7da0d4bbdb4d048ea12f53c8" };
module.exports = { buildDate:"2022-12-02T22:44:40+01:00", buildRevision: "42cd33369407a1a64eeeced4a0729b5fcd7cac47" };