Compare commits
1 Commits
v3.1.2
...
version-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da8d3b3469 |
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
@@ -1,7 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
# Maintain dependencies for GitHub Actions
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
59
.github/workflows/create-release.yaml
vendored
59
.github/workflows/create-release.yaml
vendored
@@ -1,59 +0,0 @@
|
|||||||
name: "Create Release"
|
|
||||||
|
|
||||||
on: # yamllint disable-line rule:truthy
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
RELEASE_TAG:
|
|
||||||
description: 'v{Major}.{Minor}.{Patch}'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
name: "Release"
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
runs-on: "ubuntu-latest"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Checkout source
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.ACTIONS_ACCESS_TOKEN }}
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Create branch and tag submodule
|
|
||||||
run: |
|
|
||||||
git config user.email "actions@github.com"
|
|
||||||
git config user.name "actions-user"
|
|
||||||
git submodule update --init --remote
|
|
||||||
git checkout -b 'release-${{ inputs.RELEASE_TAG }}'
|
|
||||||
(cd calcom && git fetch --tags origin && git checkout 'refs/tags/${{ inputs.RELEASE_TAG }}')
|
|
||||||
git add calcom
|
|
||||||
git commit -m "tag version Cal.com version ${{ inputs.RELEASE_TAG }}"
|
|
||||||
git push origin 'release-${{ inputs.RELEASE_TAG }}'
|
|
||||||
|
|
||||||
# note: instead of secrets.GITHUB_TOKEN here, we need to use a PAT
|
|
||||||
# so that the release creation triggers the image build workflow
|
|
||||||
- name: "Create release"
|
|
||||||
uses: "actions/github-script@v6"
|
|
||||||
with:
|
|
||||||
github-token: "${{ secrets.ACTIONS_ACCESS_TOKEN }}"
|
|
||||||
script: |
|
|
||||||
try {
|
|
||||||
const response = await github.rest.repos.createRelease({
|
|
||||||
draft: false,
|
|
||||||
generate_release_notes: true,
|
|
||||||
body: 'For Cal.com release details, see: https://github.com/calcom/cal.com/releases/tag/${{ inputs.RELEASE_TAG }}',
|
|
||||||
name: '${{ inputs.RELEASE_TAG }}',
|
|
||||||
target_commitish: 'release-${{ inputs.RELEASE_TAG }}',
|
|
||||||
owner: context.repo.owner,
|
|
||||||
prerelease: false,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
tag_name: '${{ inputs.RELEASE_TAG }}',
|
|
||||||
});
|
|
||||||
|
|
||||||
core.exportVariable('RELEASE_ID', response.data.id);
|
|
||||||
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url);
|
|
||||||
} catch (error) {
|
|
||||||
core.setFailed(error.message);
|
|
||||||
}
|
|
||||||
@@ -23,6 +23,9 @@ on:
|
|||||||
# release:
|
# release:
|
||||||
# types: [ created ]
|
# types: [ created ]
|
||||||
|
|
||||||
|
# # Allows you to run this workflow manually from the Actions tab
|
||||||
|
# workflow_dispatch:
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
# This workflow contains a single job called "build"
|
# This workflow contains a single job called "build"
|
||||||
@@ -34,14 +37,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Git submodule update
|
- name: Git submodule update
|
||||||
run: |
|
run: |
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
|
||||||
- name: Log in to the Docker Hub registry
|
- name: Log in to the Docker Hub registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v1.10.0
|
||||||
with:
|
with:
|
||||||
# Username used to log against the Docker registry
|
# Username used to log against the Docker registry
|
||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
@@ -51,7 +54,7 @@ jobs:
|
|||||||
logout: true # optional, default is true
|
logout: true # optional, default is true
|
||||||
|
|
||||||
- name: Log in to the Github Container registry
|
- name: Log in to the Github Container registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v1.10.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
@@ -88,13 +91,10 @@ jobs:
|
|||||||
network=container:database
|
network=container:database
|
||||||
buildkitd-flags: |
|
buildkitd-flags: |
|
||||||
--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
|
--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
|
||||||
# config-inline: |
|
|
||||||
# [worker.oci]
|
|
||||||
# max-parallelism = 1
|
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: ./
|
context: ./
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
|
|||||||
2
.github/workflows/update-submodules.yml
vendored
2
.github/workflows/update-submodules.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Git submodule update
|
- name: Git submodule update
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
43
Dockerfile
43
Dockerfile
@@ -1,7 +1,6 @@
|
|||||||
FROM node:18 as builder
|
FROM node:16 as builder
|
||||||
|
|
||||||
WORKDIR /calcom
|
WORKDIR /calcom
|
||||||
|
|
||||||
ARG NEXT_PUBLIC_LICENSE_CONSENT
|
ARG NEXT_PUBLIC_LICENSE_CONSENT
|
||||||
ARG CALCOM_TELEMETRY_DISABLED
|
ARG CALCOM_TELEMETRY_DISABLED
|
||||||
ARG DATABASE_URL
|
ARG DATABASE_URL
|
||||||
@@ -17,32 +16,30 @@ ENV NEXT_PUBLIC_WEBAPP_URL=http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER \
|
|||||||
CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \
|
CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \
|
||||||
NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE}
|
NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE}
|
||||||
|
|
||||||
COPY calcom/package.json calcom/yarn.lock calcom/.yarnrc.yml calcom/playwright.config.ts calcom/turbo.json calcom/git-init.sh calcom/git-setup.sh ./
|
COPY calcom/package.json calcom/yarn.lock calcom/turbo.json calcom/git-init.sh calcom/git-setup.sh ./
|
||||||
COPY calcom/.yarn ./.yarn
|
|
||||||
COPY calcom/apps/web ./apps/web
|
COPY calcom/apps/web ./apps/web
|
||||||
COPY calcom/packages ./packages
|
COPY calcom/packages ./packages
|
||||||
|
|
||||||
RUN yarn config set httpTimeout 1200000 && \
|
RUN yarn global add turbo && \
|
||||||
npx turbo prune --scope=@calcom/web --docker && \
|
yarn config set network-timeout 1000000000 -g && \
|
||||||
yarn install && \
|
turbo prune --scope=@calcom/web --docker && \
|
||||||
yarn db-deploy && \
|
yarn install
|
||||||
yarn --cwd packages/prisma seed-app-store
|
|
||||||
|
|
||||||
RUN yarn turbo run build --filter=@calcom/web
|
RUN yarn turbo run build --filter=@calcom/web
|
||||||
|
|
||||||
# RUN yarn plugin import workspace-tools && \
|
FROM node:16 as runner
|
||||||
# yarn workspaces focus --all --production
|
|
||||||
RUN rm -rf node_modules/.cache .yarn/cache apps/web/.next/cache
|
|
||||||
|
|
||||||
FROM node:18 as builder-two
|
|
||||||
|
|
||||||
WORKDIR /calcom
|
WORKDIR /calcom
|
||||||
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
|
|
||||||
COPY calcom/package.json calcom/.yarnrc.yml calcom/yarn.lock calcom/turbo.json ./
|
RUN apt-get update && \
|
||||||
COPY calcom/.yarn ./.yarn
|
apt-get -y install netcat && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
npm install --global prisma
|
||||||
|
|
||||||
|
COPY calcom/package.json calcom/yarn.lock calcom/turbo.json ./
|
||||||
COPY --from=builder /calcom/node_modules ./node_modules
|
COPY --from=builder /calcom/node_modules ./node_modules
|
||||||
COPY --from=builder /calcom/packages ./packages
|
COPY --from=builder /calcom/packages ./packages
|
||||||
COPY --from=builder /calcom/apps/web ./apps/web
|
COPY --from=builder /calcom/apps/web ./apps/web
|
||||||
@@ -56,19 +53,5 @@ ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
|
|||||||
|
|
||||||
RUN scripts/replace-placeholder.sh http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER ${NEXT_PUBLIC_WEBAPP_URL}
|
RUN scripts/replace-placeholder.sh http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER ${NEXT_PUBLIC_WEBAPP_URL}
|
||||||
|
|
||||||
FROM node:18 as runner
|
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /calcom
|
|
||||||
COPY --from=builder-two /calcom ./
|
|
||||||
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
|
||||||
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
|
|
||||||
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL
|
|
||||||
|
|
||||||
ENV NODE_ENV production
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=30s --retries=5 \
|
|
||||||
CMD wget --spider http://localhost:3000 || exit 1
|
|
||||||
|
|
||||||
CMD ["/calcom/scripts/start.sh"]
|
CMD ["/calcom/scripts/start.sh"]
|
||||||
2
calcom
2
calcom
Submodule calcom updated: 43a30aa51d...bdb4a7353b
Reference in New Issue
Block a user