budibase/packages/worker/Dockerfile

37 lines
1.2 KiB
Docker
Raw Normal View History

FROM node:14-alpine
2021-07-29 21:32:18 +02: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-19 18:30:48 +02:00
WORKDIR /app
# handle node-gyp
2023-05-19 14:45:05 +02:00
RUN apk add --no-cache --virtual .gyp python3 make g++
RUN yarn global add pm2
2023-05-19 14:45:05 +02:00
COPY dist/package.json .
RUN yarn
2023-05-23 11:54:10 +02:00
# Remove unneeded data from file system to reduce image size
2023-05-19 14:45:05 +02:00
RUN apk del .gyp \
&& yarn cache clean
2023-05-19 18:30:48 +02:00
COPY dist/ dist/
2023-05-19 19:56:19 +02:00
COPY docker_run.sh .
2023-05-19 14:45:05 +02:00
EXPOSE 4001
# 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
ENV CLUSTER_MODE=${CLUSTER_MODE}
ENV SERVICE=worker-service
2022-08-08 15:03:04 +02:00
ENV POSTHOG_TOKEN=phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU
ENV TENANT_FEATURE_FLAGS=*:LICENSING,*:USER_GROUPS,*:ONBOARDING_TOUR
ENV ACCOUNT_PORTAL_URL=https://account.budibase.app
CMD ["./docker_run.sh"]