1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Fix server docker

This commit is contained in:
Adria Navarro 2023-05-19 16:44:09 +02:00
parent e030dd866d
commit 82f53483b2
4 changed files with 9 additions and 2 deletions

View file

@ -3,3 +3,4 @@
!/scripts/integrations/oracle/ !/scripts/integrations/oracle/
!/package.json !/package.json
!/docker_run.sh !/docker_run.sh
!/builder/

View file

@ -34,6 +34,7 @@ RUN apt-get remove -y --purge --auto-remove g++ make python \
COPY dist/ . COPY dist/ .
COPY docker_run.sh . COPY docker_run.sh .
COPY builder/ builder/
EXPOSE 4001 EXPOSE 4001
@ -42,4 +43,6 @@ EXPOSE 4001
# which are actually needed to get this environment up and running # which are actually needed to get this environment up and running
ENV NODE_ENV=production ENV NODE_ENV=production
ENV CLUSTER_MODE=${CLUSTER_MODE} ENV CLUSTER_MODE=${CLUSTER_MODE}
ENV TOP_LEVEL_PATH=/app
CMD ["./docker_run.sh"] CMD ["./docker_run.sh"]

View file

@ -96,6 +96,7 @@ const environment = {
isInThread: () => { isInThread: () => {
return process.env.FORKED_PROCESS return process.env.FORKED_PROCESS
}, },
TOP_LEVEL_PATH: process.env.TOP_LEVEL_PATH,
} }
// threading can cause memory issues with node-ts in development // threading can cause memory issues with node-ts in development

View file

@ -4,9 +4,11 @@ import { budibaseTempDir } from "../budibaseDir"
import { join } from "path" import { join } from "path"
import env from "../../environment" import env from "../../environment"
import tar from "tar" import tar from "tar"
import environment from "../../environment"
const uuid = require("uuid/v4") const uuid = require("uuid/v4")
export const TOP_LEVEL_PATH = join(__dirname, "..", "..", "..") export const TOP_LEVEL_PATH =
environment.TOP_LEVEL_PATH || join(__dirname, "..", "..", "..")
/** /**
* Upon first startup of instance there may not be everything we need in tmp directory, set it up. * Upon first startup of instance there may not be everything we need in tmp directory, set it up.