1
0
Fork 0
mirror of synced 2024-07-04 14:01:27 +12: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

@ -2,4 +2,5 @@
!/dist/
!/scripts/integrations/oracle/
!/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 docker_run.sh .
COPY builder/ builder/
EXPOSE 4001
@ -42,4 +43,6 @@ EXPOSE 4001
# which are actually needed to get this environment up and running
ENV NODE_ENV=production
ENV CLUSTER_MODE=${CLUSTER_MODE}
ENV TOP_LEVEL_PATH=/app
CMD ["./docker_run.sh"]

View file

@ -96,6 +96,7 @@ const environment = {
isInThread: () => {
return process.env.FORKED_PROCESS
},
TOP_LEVEL_PATH: process.env.TOP_LEVEL_PATH,
}
// 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 env from "../../environment"
import tar from "tar"
import environment from "../../environment"
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.