mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46fdd15857 | ||
|
|
42cd333694 | ||
|
|
aaa69f696b | ||
|
|
8ce9dcf4aa | ||
|
|
130ded91ff | ||
|
|
851465da62 |
22
Dockerfile
22
Dockerfile
@@ -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
4
package-lock.json
generated
@@ -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": {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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" };
|
||||
|
||||
Reference in New Issue
Block a user