Fix server docker
This commit is contained in:
parent
e030dd866d
commit
82f53483b2
|
@ -3,3 +3,4 @@
|
||||||
!/scripts/integrations/oracle/
|
!/scripts/integrations/oracle/
|
||||||
!/package.json
|
!/package.json
|
||||||
!/docker_run.sh
|
!/docker_run.sh
|
||||||
|
!/builder/
|
|
@ -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"]
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue