Dockerise server

This commit is contained in:
Adria Navarro 2023-05-19 16:26:34 +02:00
parent f27c4ae55a
commit bfd846e9a4
3 changed files with 17 additions and 28 deletions

View File

@ -1,20 +1,5 @@
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
*
!/dist/
!/scripts/integrations/oracle/
!/package.json
!/docker_run.sh

View File

@ -15,22 +15,26 @@ ENV POSTHOG_TOKEN=phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU
ENV TENANT_FEATURE_FLAGS=*:LICENSING,*:USER_GROUPS,*:ONBOARDING_TOUR
ENV ACCOUNT_PORTAL_URL=https://account.budibase.app
# copy required files
COPY . ./
# handle node-gyp
RUN apt-get update \
&& apt-get install -y --no-install-recommends g++ make python \
&& 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
&& apt-get install -y --no-install-recommends g++ make python
RUN yarn global add pm2
# Install client for oracle datasource
RUN apt-get install unzip libaio1
COPY scripts/integrations/oracle/ scripts/integrations/oracle/
RUN /bin/bash -e scripts/integrations/oracle/instantclient/linux/x86-64/install.sh
COPY package.json .
RUN yarn \
&& yarn cache clean
RUN 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
COPY dist/ .
COPY docker_run.sh .
EXPOSE 4001
# have to add node environment production after install

View File

@ -20,7 +20,7 @@
"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": "node index.js",
"run:docker:cluster": "pm2-runtime start pm2.config.js",
"dev:stack:up": "node scripts/dev/manage.js up",
"dev:stack:down": "node scripts/dev/manage.js down",