Updating Dockerfiles and dockerignore to clear out any un-needed assets.
This commit is contained in:
parent
49b45f5e67
commit
5066d20c9d
|
@ -1,6 +1,20 @@
|
|||
node_modules
|
||||
npm-debug.log
|
||||
Dockerfile
|
||||
src
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
||||
.yarnrc
|
||||
.vscode
|
||||
.idea
|
||||
.env
|
||||
__mocks__
|
||||
yarn-error.log
|
||||
jest.config.ts
|
||||
jest-testcontainers-config.js
|
||||
LICENSE
|
||||
nodemon.json
|
||||
tsconfig.build.json
|
||||
tsconfig.json
|
||||
coverage
|
||||
|
|
|
@ -15,8 +15,8 @@ ENV POSTHOG_TOKEN=phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU
|
|||
ENV TENANT_FEATURE_FLAGS=*:LICENSING,*:USER_GROUPS,*:ONBOARDING_TOUR
|
||||
ENV ACCOUNT_PORTAL_URL=https://account.budibase.app
|
||||
|
||||
# copy files and install dependencies
|
||||
COPY package.json dist specs client build builder docker_run.sh pm2.config.js ./
|
||||
# copy required files
|
||||
COPY . ./
|
||||
|
||||
# handle node-gyp
|
||||
RUN apt-get update \
|
||||
|
@ -24,9 +24,9 @@ RUN apt-get update \
|
|||
&& yarn \
|
||||
&& yarn cache clean \
|
||||
&& apt-get remove -y --purge --auto-remove g++ make python \
|
||||
&& rm -rf /tmp/* /root/.node-gyp /usr/local/lib/node_modules/npm/node_modules/node-gyp
|
||||
&& rm -rf /tmp/* /root/.node-gyp /usr/local/lib/node_modules/npm/node_modules/node-gyp \
|
||||
&& rm -rf node_modules/@budibase
|
||||
RUN yarn global add pm2
|
||||
RUN yarn
|
||||
|
||||
# Install client for oracle datasource
|
||||
RUN apt-get install unzip libaio1
|
||||
|
|
|
@ -10,16 +10,16 @@
|
|||
},
|
||||
"scripts": {
|
||||
"prebuild": "rimraf dist/",
|
||||
"build": "tsc -p tsconfig.build.json && mv dist/src/* dist/ && rimraf dist/src/",
|
||||
"esbuild": "../../scripts/build.js",
|
||||
"build": "../../scripts/build.js",
|
||||
"tsbuild": "tsc -p tsconfig.build.json && mv dist/src/* dist/ && rimraf dist/src/",
|
||||
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
|
||||
"debug": "yarn build && node --expose-gc --inspect=9222 dist/index.js",
|
||||
"postbuild": "copyfiles -u 1 src/**/*.svelte dist/ && copyfiles -u 1 src/**/*.hbs dist/ && copyfiles -u 1 src/**/*.json dist/",
|
||||
"test": "bash scripts/test.sh",
|
||||
"test:memory": "jest --maxWorkers=2 --logHeapUsage --forceExit",
|
||||
"test:watch": "jest --watch",
|
||||
"predocker": "copyfiles -f ../client/dist/budibase-client.js ../client/manifest.json client",
|
||||
"build:docker": "yarn run predocker && yarn run esbuild && docker build . -t app-service --label version=$BUDIBASE_RELEASE_VERSION",
|
||||
"predocker": "copyfiles -f ../client/dist/budibase-client.js ../client/manifest.json client && yarn build",
|
||||
"build:docker": "yarn predocker && docker build . -t app-service --label version=$BUDIBASE_RELEASE_VERSION",
|
||||
"build:docs": "node ./scripts/docs/generate.js open",
|
||||
"run:docker": "node dist/index.js",
|
||||
"run:docker:cluster": "pm2-runtime start pm2.config.js",
|
||||
|
|
|
@ -103,6 +103,8 @@ const environment = {
|
|||
},
|
||||
}
|
||||
|
||||
console.log(environment)
|
||||
|
||||
// threading can cause memory issues with node-ts in development
|
||||
if (isDev() && environment.DISABLE_THREADING == null) {
|
||||
environment._set("DISABLE_THREADING", "1")
|
||||
|
|
|
@ -1,7 +1,20 @@
|
|||
node_modules
|
||||
npm-debug.log
|
||||
Dockerfile
|
||||
src
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
||||
|
||||
.yarnrc
|
||||
.vscode
|
||||
.idea
|
||||
.env
|
||||
__mocks__
|
||||
yarn-error.log
|
||||
jest.config.ts
|
||||
jest-testcontainers-config.js
|
||||
LICENSE
|
||||
nodemon.json
|
||||
tsconfig.build.json
|
||||
tsconfig.json
|
||||
coverage
|
||||
|
|
|
@ -7,11 +7,15 @@ LABEL com.centurylinklabs.watchtower.lifecycle.post-check="scripts/watchtower-ho
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# copy files and install dependencies
|
||||
# copy required files
|
||||
COPY . ./
|
||||
|
||||
# handle node-gyp
|
||||
RUN apk add --no-cache --virtual .gyp python3 make g++ \
|
||||
&& yarn && apk del .gyp
|
||||
&& yarn && apk del .gyp \
|
||||
&& yarn \
|
||||
&& yarn cache clean \
|
||||
&& rm -rf node_modules/@budibase
|
||||
RUN yarn global add pm2
|
||||
|
||||
EXPOSE 4001
|
||||
|
|
|
@ -13,13 +13,15 @@
|
|||
],
|
||||
"scripts": {
|
||||
"prebuild": "rimraf dist/",
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"build": "../../scripts/build.js",
|
||||
"tsbuild": "tsc -p tsconfig.build.json",
|
||||
"postbuild": "copyfiles -u 1 src/**/*.hbs dist/",
|
||||
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
|
||||
"run:docker": "node dist/index.js",
|
||||
"debug": "yarn build && node --expose-gc --inspect=9223 dist/index.js",
|
||||
"run:docker:cluster": "pm2-runtime start pm2.config.js",
|
||||
"build:docker": "docker build . -t worker-service --label version=$BUDIBASE_RELEASE_VERSION",
|
||||
"predocker": "yarn build",
|
||||
"build:docker": "yarn predocker && docker build . -t worker-service --label version=$BUDIBASE_RELEASE_VERSION",
|
||||
"dev:stack:init": "node ./scripts/dev/manage.js init",
|
||||
"dev:builder": "npm run dev:stack:init && rimraf dist/ && nodemon",
|
||||
"dev:built": "yarn run dev:stack:init && yarn run run:docker",
|
||||
|
|
Loading…
Reference in New Issue