Skip to content

Scheduling infrastructure for absolutely everyone.

chore: Remove /infra folder (#24462)

Keith Williams3b19c064fd55
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 9fdb484f791..693c2f68454 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -10,7 +10,6 @@
/apps/web/lib/handleOrgRedirect.ts @calcom/Foundation
/apps/web/middleware.ts @calcom/Foundation
/deploy/**/* @calcom/Foundation
-/infra/**/* @calcom/Foundation
/packages/app-store/applecalendar/**/* @calcom/Foundation
/packages/app-store/caldavcalendar/**/* @calcom/Foundation
/packages/app-store/exchange2013calendar/**/* @calcom/Foundation
diff --git a/infra/README.md b/infra/README.md
deleted file mode 100644
index b1a7194a918..00000000000
--- a/infra/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Infrastructure Folder
-
-This folder, located within the "infra" directory of our monorepo, is dedicated to managing the infrastructure as code (IaC) and Docker-related files for our project. It plays a critical role in orchestrating, configuring, and maintaining the infrastructure that our applications rely on.
diff --git a/infra/docker/api/Dockerfile b/infra/docker/api/Dockerfile
deleted file mode 100644
index 15f17b8ba5b..00000000000
--- a/infra/docker/api/Dockerfile
+++ /dev/null
@@ -1,73 +0,0 @@
-# syntax = docker/dockerfile:1
-
-# Adjust NODE_VERSION as desired
-ARG NODE_VERSION=20.7.0
-FROM node:${NODE_VERSION}-slim as base
-
-ARG DATABASE_URL
-
-# Next.js/Prisma app lives here
-WORKDIR /app
-
-# Set production environment
-ENV NODE_ENV="production" \
- DATABASE_URL=$DATABASE_URL \
- DATABASE_DIRECT_URL=$DATABASE_URL
-
-# Throw-away build stage to reduce size of final image
-FROM base as build
-
-# copy all required files from the monorepo
-COPY package.json yarn.lock .yarnrc.yml playwright.config.ts turbo.json git-init.sh git-setup.sh ./
-COPY /.yarn ./.yarn
-COPY ./apps/api ./apps/api
-COPY ./packages ./packages
-# TODO: follow up pr to remove dependencies on web
-COPY ./apps/web ./apps/web
-COPY ./tests ./tests
-
-# Install node modules and dependencies, prune unneeded deps, then build
-RUN set -eux; \
- apt-get update -qq && \
- apt-get install -y build-essential openssl pkg-config python-is-python3 && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists /var/cache/apt/archives && \
- yarn config set httpTimeout 1200000 && \
- npx turbo prune --filter=@calcom/web --docker && \
- npx turbo prune --filter=@calcom/api --docker && \
- yarn install && \
- yarn turbo run build --filter=@calcom/api
-
-
-# Final stage
-FROM base
-WORKDIR /app
-
-# Install packages needed for deployment
-RUN apt-get update -qq && \
- apt-get install --no-install-recommends -y openssl && \
- rm -rf /var/lib/apt/lists /var/cache/apt/archives
-
-# Copy built application
-COPY --from=build /app/package.json ./package.json
-COPY --from=build /app/node_modules ./node_modules
-COPY --from=build /app/apps/api/package.json ./apps/api/package.json
-COPY --from=build /app/apps/api/next-i18next.config.js ./apps/api/next-i18next.config.js
-COPY --from=build /app/apps/api/next.config.js ./apps/api/next.config.js
-COPY --from=build /app/apps/api/tsconfig.json ./apps/api/tsconfig.json
-COPY --from=build /app/apps/api/.next ./apps/api/.next
-COPY --from=build /app/apps/api/.turbo ./apps/api/.turbo
-COPY --from=build /app/turbo.json ./turbo.json
-COPY --from=build /app/yarn.lock ./yarn.lock
-COPY --from=build /app/packages/config ./packages/config
-COPY --from=build /app/packages/tsconfig ./packages/tsconfig
-COPY --from=build /app/packages/types ./packages/types
-COPY --from=build /app/apps/web/next.config.js ./apps/web/next.config.js
-COPY --from=build /app/apps/web/next-i18next.config.js ./apps/web/next-i18next.config.js
-COPY --from=build /app/apps/web/public/static/locales ./apps/web/public/static/locales
-COPY --from=build /app/apps/web/package.json ./apps/web/package.json
-# Expose port 80
-EXPOSE 80
-
-# Start cmd, called when docker image is mounted
-CMD [ "yarn", "workspace", "@calcom/api", "docker-start-api"]
diff --git a/package.json b/package.json
index 2a159067971..28c07378cb5 100644
--- a/package.json
+++ b/package.json
@@ -77,9 +77,6 @@
"type-check": "turbo run type-check",
"type-check:ci": "turbo run type-check:ci --log-prefix=none",
"web": "yarn workspace @calcom/web",
- "docker-build-api": "docker build -t cal-api -f ./infra/docker/api/Dockerfile .",
- "docker-run-api": "docker run -p 80:80 cal-api",
- "docker-stop-api": "docker ps --filter 'ancestor=cal-api' -q | xargs docker stop",
"changesets-add": "yarn changeset add",
"changesets-version": "yarn changeset version",
"changesets-release": "NODE_OPTIONS='--max_old_space_size=12288' turbo run build --filter=@calcom/atoms && yarn changeset publish",