mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Restructure docker image so relative paths in code work (#30)
This commit is contained in:
@@ -35,13 +35,14 @@ WORKDIR /bonob
|
|||||||
|
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
COPY yarn.lock .
|
COPY yarn.lock .
|
||||||
COPY --from=build /bonob/build/src/* ./
|
|
||||||
|
COPY --from=build /bonob/build/src ./src
|
||||||
COPY --from=build /bonob/node_modules ./node_modules
|
COPY --from=build /bonob/node_modules ./node_modules
|
||||||
COPY web web
|
COPY web ./web
|
||||||
COPY src/Sonoswsdl-1.19.4-20190411.142401-3.wsdl /bonob/Sonoswsdl-1.19.4-20190411.142401-3.wsdl
|
COPY src/Sonoswsdl-1.19.4-20190411.142401-3.wsdl ./src/Sonoswsdl-1.19.4-20190411.142401-3.wsdl
|
||||||
|
|
||||||
RUN apk add --no-cache --update vips
|
RUN apk add --no-cache --update vips
|
||||||
|
|
||||||
USER nobody
|
USER nobody
|
||||||
|
|
||||||
CMD ["node", "./app.js"]
|
CMD ["node", "/bonob/src/app.js"]
|
||||||
@@ -34,7 +34,7 @@ export const BONOB_ACCESS_TOKEN_HEADER = "bonob-access-token";
|
|||||||
|
|
||||||
const icon = (name: string) =>
|
const icon = (name: string) =>
|
||||||
fs
|
fs
|
||||||
.readFileSync(path.resolve(".", "web", "icons", name))
|
.readFileSync(path.resolve(__dirname, "..", "web", "icons", name))
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
export type Icon = { svg: string; size: number };
|
export type Icon = { svg: string; size: number };
|
||||||
@@ -110,7 +110,7 @@ function server(
|
|||||||
app.engine("eta", Eta.renderFile);
|
app.engine("eta", Eta.renderFile);
|
||||||
|
|
||||||
app.set("view engine", "eta");
|
app.set("view engine", "eta");
|
||||||
app.set("views", "./web/views");
|
app.set("views", path.resolve(__dirname, "..", "web", "views"));
|
||||||
|
|
||||||
const langFor = (req: Request) => {
|
const langFor = (req: Request) => {
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|||||||
Reference in New Issue
Block a user