chore: remove old deployments (#4922)

We migrated all Twenty's env to the new Twenty docker image. We can now
remove old deployments of front and back.
This PR takes care of that!
This commit is contained in:
Quentin G
2024-04-11 16:35:11 +02:00
committed by GitHub
parent ee64576e5f
commit e48960afbe
4 changed files with 0 additions and 105 deletions

View File

@ -35,18 +35,6 @@ prod-build:
prod-run:
@docker run -d -p 3000:3000 --name twenty twenty
prod-front-build:
@cd ../.. && docker build -f ./packages/twenty-docker/twenty-front/Dockerfile --tag twenty-front . && cd -
prod-front-run:
@docker run -d -p 3001:3000 --name twenty-front twenty-front
prod-server-build:
@cd ../.. && docker build -f ./packages/twenty-docker/twenty-server/Dockerfile --tag twenty-server . && cd -
prod-server-run:
@docker run -d -p 3000:3000 --name twenty-server twenty-server
prod-postgres-build:
@cd ../.. && docker build -f ./packages/twenty-docker/twenty-postgres/Dockerfile --tag twenty-postgres . && cd -
@ -59,22 +47,6 @@ prod-website-build:
prod-website-run:
@docker run -d -p 3000:3000 --name twenty-website twenty-website
release-front:
@cd ../.. && docker buildx build \
--push \
--no-cache \
--platform linux/amd64,linux/arm64 \
-f ./packages/twenty-docker/twenty-front/Dockerfile -t twentycrm/twenty-front:$(version) -t twentycrm/twenty-front:latest . \
&& cd -
release-server:
@cd ../.. && docker buildx build \
--push \
--no-cache \
--platform linux/amd64,linux/arm64 \
-f ./packages/twenty-docker/twenty-server/Dockerfile -t twentycrm/twenty-server:$(version) -t twentycrm/twenty-server:latest . \
&& cd -
release-docs:
@cd ../.. && docker buildx build \
--push \

View File

@ -1,36 +0,0 @@
FROM node:18.17.1-alpine as twenty-front-build
ARG REACT_APP_SERVER_BASE_URL
WORKDIR /app
COPY ./package.json .
COPY ./yarn.lock .
COPY ./.yarnrc.yml .
COPY ./nx.json .
COPY ./tsconfig.base.json .
COPY ./.yarn/releases /app/.yarn/releases
COPY ./tools/eslint-rules /app/tools/eslint-rules
COPY ./packages/twenty-emails /app/packages/twenty-emails
COPY ./packages/twenty-ui /app/packages/twenty-ui
COPY ./packages/twenty-front/package.json /app/packages/twenty-front/package.json
RUN yarn
COPY ./packages/twenty-front /app/packages/twenty-front
RUN yarn nx build twenty-front
FROM node:18.17.1-alpine as twenty-front
WORKDIR /app/packages/twenty-front
COPY --from=twenty-front-build /app/packages/twenty-front/build ./build
COPY ./packages/twenty-docker/twenty-front/serve.json ./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"]

View File

@ -1,6 +0,0 @@
{
"rewrites": [
{ "source": "!static/**", "destination": "/index.html" }
],
"directoryListing": false
}

View File

@ -1,35 +0,0 @@
FROM node:18.16.0-alpine as twenty-server-build
WORKDIR /app
COPY ./package.json .
COPY ./yarn.lock .
COPY ./.yarnrc.yml .
COPY ./tsconfig.base.json .
COPY ./nx.json .
COPY ./.yarn/releases /app/.yarn/releases
COPY ./packages/twenty-emails /app/packages/twenty-emails
COPY ./packages/twenty-server /app/packages/twenty-server
RUN yarn
RUN npx nx reset
RUN npx nx run twenty-server:build
RUN mv /app/packages/twenty-server/dist /app/packages/twenty-server/build
RUN npx nx run twenty-server:build:packageJson
RUN mv /app/packages/twenty-server/dist/package.json /app/packages/twenty-server/package.json
RUN rm -rf /app/packages/twenty-server/dist
RUN mv /app/packages/twenty-server/build /app/packages/twenty-server/dist
WORKDIR /app
RUN yarn workspaces focus --production twenty-emails twenty-server
FROM node:18.17.1-alpine as twenty-server
COPY --from=twenty-server-build /app /app
WORKDIR /app/packages/twenty-server
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 backend, ensuring it deploys faster and runs the same way regardless of the deployment environment."
CMD ["node", "dist/src/main"]