[Wip] Update CI CD (#2945)
* Update CI and CD scripts * Fix docker docs build * Fix CD * Fix CD * Update front build and add postgres intel pg_graphql files * Fix postgres install * Fix * Update docs
This commit is contained in:
32
packages/twenty-docker/prod/twenty-front/Dockerfile
Normal file
32
packages/twenty-docker/prod/twenty-front/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM node:18.16.0-alpine as twenty-front-build
|
||||
|
||||
ARG REACT_APP_SERVER_BASE_URL
|
||||
ARG REACT_APP_SERVER_AUTH_URL
|
||||
ARG REACT_APP_SERVER_FILES_URL
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./package.json .
|
||||
COPY ./yarn.lock .
|
||||
COPY ./.yarnrc.yml .
|
||||
COPY ./.yarn/releases /app/.yarn/releases
|
||||
COPY ./packages/eslint-plugin-twenty /app/packages/eslint-plugin-twenty
|
||||
COPY ./packages/twenty-front /app/packages/twenty-front
|
||||
|
||||
RUN yarn
|
||||
RUN yarn nx build twenty-front
|
||||
|
||||
COPY ./packages/twenty-docker/prod/twenty-front/serve.json ./build
|
||||
|
||||
FROM node:18.16.0-alpine as twenty-front
|
||||
|
||||
WORKDIR /app/packages/twenty-front
|
||||
|
||||
COPY --from=twenty-front-build /app/packages/twenty-front/build ./build
|
||||
COPY ./packages/twenty-front/scripts/inject-runtime-env.sh /app/packages/twenty-front/scripts/inject-runtime-env.sh
|
||||
RUN yarn global add serve
|
||||
|
||||
LABEL org.opencontainers.image.source=https://github.com/twentyhq/twenty
|
||||
LABEL org.opencontainers.image.description="This image provides a consistent and reproducible environment for the frontend."
|
||||
|
||||
CMD ["/bin/sh", "-c", "./scripts/inject-runtime-env.sh && serve build"]
|
||||
Reference in New Issue
Block a user