Fix Dockerfile.embedded failing to build

This commit is contained in:
root 2023-05-31 11:04:58 +00:00
parent 681dff66df
commit 7d841abf70
4 changed files with 9588 additions and 9587 deletions

View file

@ -6,6 +6,7 @@ COPY webui webui
### Build Vue.js into plain HTML/CSS/JS ### Build Vue.js into plain HTML/CSS/JS
WORKDIR /app/webui WORKDIR /app/webui
RUN npm i
RUN npm run build-embed RUN npm run build-embed
FROM golang:1.19.1 AS builder FROM golang:1.19.1 AS builder
@ -30,4 +31,4 @@ WORKDIR /app/
COPY --from=builder /app/webapi ./ COPY --from=builder /app/webapi ./
### Executable command ### Executable command
CMD ["/app/webapi", "--db-filename", "/data/wasaphoto.db", "--data-path", "/data/data"] CMD ["/app/webapi", "--db-filename", "/data/wasaphoto.db", "--data-path", "/data/data"]

View file

@ -159,83 +159,83 @@ var pify$1 = pify$2.exports = function (obj, P, opts) {
pify$1.all = pify$1; pify$1.all = pify$1;
var fs = require$$0__default; var fs = require$$0__default;
var path$2 = require$$0; var path$2 = require$$0;
var pify = pify$2.exports; var pify = pify$2.exports;
var stat = pify(fs.stat); var stat = pify(fs.stat);
var readFile = pify(fs.readFile); var readFile = pify(fs.readFile);
var resolve = path$2.resolve; var resolve = path$2.resolve;
var cache = Object.create(null); var cache = Object.create(null);
function convert(content, encoding) { function convert(content, encoding) {
if (Buffer.isEncoding(encoding)) { if (Buffer.isEncoding(encoding)) {
return content.toString(encoding); return content.toString(encoding);
} }
return content; return content;
} }
readCache$1.exports = function (path, encoding) { readCache$1.exports = function (path, encoding) {
path = resolve(path); path = resolve(path);
return stat(path).then(function (stats) { return stat(path).then(function (stats) {
var item = cache[path]; var item = cache[path];
if (item && item.mtime.getTime() === stats.mtime.getTime()) { if (item && item.mtime.getTime() === stats.mtime.getTime()) {
return convert(item.content, encoding); return convert(item.content, encoding);
} }
return readFile(path).then(function (data) { return readFile(path).then(function (data) {
cache[path] = { cache[path] = {
mtime: stats.mtime, mtime: stats.mtime,
content: data content: data
}; };
return convert(data, encoding); return convert(data, encoding);
}); });
}).catch(function (err) { }).catch(function (err) {
cache[path] = null; cache[path] = null;
return Promise.reject(err); return Promise.reject(err);
}); });
}; };
readCache$1.exports.sync = function (path, encoding) { readCache$1.exports.sync = function (path, encoding) {
path = resolve(path); path = resolve(path);
try { try {
var stats = fs.statSync(path); var stats = fs.statSync(path);
var item = cache[path]; var item = cache[path];
if (item && item.mtime.getTime() === stats.mtime.getTime()) { if (item && item.mtime.getTime() === stats.mtime.getTime()) {
return convert(item.content, encoding); return convert(item.content, encoding);
} }
var data = fs.readFileSync(path); var data = fs.readFileSync(path);
cache[path] = { cache[path] = {
mtime: stats.mtime, mtime: stats.mtime,
content: data content: data
}; };
return convert(data, encoding); return convert(data, encoding);
} catch (err) { } catch (err) {
cache[path] = null; cache[path] = null;
throw err; throw err;
} }
}; };
readCache$1.exports.get = function (path, encoding) { readCache$1.exports.get = function (path, encoding) {
path = resolve(path); path = resolve(path);
if (cache[path]) { if (cache[path]) {
return convert(cache[path].content, encoding); return convert(cache[path].content, encoding);
} }
return null; return null;
}; };
readCache$1.exports.clear = function () { readCache$1.exports.clear = function () {
cache = Object.create(null); cache = Object.create(null);
}; };
const readCache = readCache$1.exports; const readCache = readCache$1.exports;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff