2023-08-19 01:33:21 +12:00
FROM node:18-slim
2021-11-10 06:10:26 +13:00
2021-07-30 07:32:18 +12:00
LABEL com.centurylinklabs.watchtower.lifecycle.pre-check= "scripts/watchtower-hooks/pre-check.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update= "scripts/watchtower-hooks/pre-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-update= "scripts/watchtower-hooks/post-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-check= "scripts/watchtower-hooks/post-check.sh"
2023-05-20 04:30:48 +12:00
WORKDIR /app
2020-06-16 04:06:54 +12:00
2021-02-26 02:27:46 +13:00
ENV PORT = 4001
2020-07-09 08:53:15 +12:00
ENV COUCH_DB_URL = https://couchdb.budi.live:5984
2020-12-12 05:38:40 +13:00
ENV BUDIBASE_ENVIRONMENT = PRODUCTION
2022-06-02 01:10:00 +12:00
ENV SERVICE = app-service
2022-08-09 01:03:04 +12:00
ENV POSTHOG_TOKEN = phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU
2023-02-02 03:12:43 +13:00
ENV TENANT_FEATURE_FLAGS = *:LICENSING,*:USER_GROUPS,*:ONBOARDING_TOUR
2022-09-24 00:40:00 +12:00
ENV ACCOUNT_PORTAL_URL = https://account.budibase.app
2023-06-08 03:39:33 +12:00
ENV TOP_LEVEL_PATH = /
2023-04-25 05:24:09 +12:00
2022-05-27 22:35:55 +12:00
# handle node-gyp
2022-05-28 02:36:34 +12:00
RUN apt-get update \
2023-08-19 01:33:21 +12:00
&& apt-get install -y --no-install-recommends g++ make python3
2022-05-24 03:24:29 +12:00
RUN yarn global add pm2
2020-06-16 04:06:54 +12:00
2021-11-10 06:10:26 +13:00
# Install client for oracle datasource
RUN apt-get install unzip libaio1
2023-05-20 02:26:34 +12:00
COPY scripts/integrations/oracle/ scripts/integrations/oracle/
2021-11-10 06:10:26 +13:00
RUN /bin/bash -e scripts/integrations/oracle/instantclient/linux/x86-64/install.sh
2023-06-22 22:29:32 +12:00
# Install postgres client for pg_dump utils
2023-06-22 22:13:20 +12:00
RUN apt update && apt upgrade -y \
&& apt install software-properties-common apt-transport-https curl gpg -y \
&& curl -fsSl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/postgresql.gpg > /dev/null \
&& echo deb [ arch = amd64,arm64,ppc64el signed-by= /usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ $( lsb_release -cs) -pgdg main | tee /etc/apt/sources.list.d/postgresql.list \
&& apt update -y \
&& apt install postgresql-client-15 -y \
&& apt remove software-properties-common apt-transport-https curl gpg -y
2023-05-20 02:26:34 +12:00
COPY package.json .
2023-06-03 02:49:06 +12:00
COPY dist/yarn.lock .
2023-06-22 22:37:33 +12:00
RUN yarn install --production= true \
# Remove unneeded data from file system to reduce image size
&& yarn cache clean && apt-get remove -y --purge --auto-remove g++ make python \
2023-05-20 02:26:34 +12:00
&& rm -rf /tmp/* /root/.node-gyp /usr/local/lib/node_modules/npm/node_modules/node-gyp
2023-05-20 04:30:48 +12:00
COPY dist/ dist/
2023-05-20 02:26:34 +12:00
COPY docker_run.sh .
2023-05-20 02:44:09 +12:00
COPY builder/ builder/
2023-05-20 02:59:09 +12:00
COPY client/ client/
2023-05-20 02:26:34 +12:00
2020-06-16 04:06:54 +12:00
EXPOSE 4001
2020-12-12 05:38:40 +13:00
# have to add node environment production after install
# due to this causing yarn to stop installing dev dependencies
# which are actually needed to get this environment up and running
ENV NODE_ENV = production
2022-05-24 03:24:29 +12:00
ENV CLUSTER_MODE = ${ CLUSTER_MODE }
2023-05-20 02:44:09 +12:00
ENV TOP_LEVEL_PATH = /app
2022-05-24 03:24:29 +12:00
CMD [ "./docker_run.sh" ]