Compare commits
345 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a223fb54e | ||
|
|
5ba19ae91e | ||
|
|
2c6a90f78e | ||
|
|
4a64514d70 | ||
|
|
59105f87cb | ||
|
|
7924c2051a | ||
|
|
c279c189bc | ||
|
|
8845a7ab38 | ||
|
|
fd330b9914 | ||
|
|
0945517ebc | ||
|
|
72c221a0c8 | ||
|
|
64b139d1bc | ||
|
|
e69f114b45 | ||
|
|
d5e24a6daa | ||
|
|
2c1a6395e4 | ||
|
|
43cce1ba4a | ||
|
|
3cfe800a24 | ||
|
|
a8f96a04d1 | ||
|
|
b0b55b3741 | ||
|
|
16b3606572 | ||
|
|
0067efe9a3 | ||
|
|
1e0e1015c1 | ||
|
|
9ec138bee0 | ||
|
|
174dcddada | ||
|
|
06b8d1f521 | ||
|
|
10b61462a3 | ||
|
|
30cdb2e937 | ||
|
|
553c542548 | ||
|
|
32124c4b44 | ||
|
|
daac456353 | ||
|
|
565a93571e | ||
|
|
d102ff9976 | ||
|
|
ab78be5209 | ||
|
|
83471cbc38 | ||
|
|
7777573d50 | ||
|
|
97cb3c70c9 | ||
|
|
2659e73b6a | ||
|
|
89b2dae3c6 | ||
|
|
ece2425a27 | ||
|
|
3aec121771 | ||
|
|
a9f96e87ac | ||
|
|
01b66f7c0a | ||
|
|
91bb9e89ee | ||
|
|
609407a07b | ||
|
|
fca067bc39 | ||
|
|
647ca613a8 | ||
|
|
19496ec37a | ||
|
|
0c8a1d0482 | ||
|
|
97579662d9 | ||
|
|
c775ba8eda | ||
|
|
e2951d7233 | ||
|
|
83d3949f51 | ||
|
|
4a331b89e7 | ||
|
|
3f7b53cba9 | ||
|
|
1909d0cbd0 | ||
|
|
44b070ee39 | ||
|
|
e0d6d4e894 | ||
|
|
07c4ff9a1c | ||
|
|
e9847d64ae | ||
|
|
d599e5141b | ||
|
|
a77008e07e | ||
|
|
34dea39472 | ||
|
|
8f7466f792 | ||
|
|
6c25a87fcc | ||
|
|
a8807a42d9 | ||
|
|
366c915e22 | ||
|
|
1f97b6dc1c | ||
|
|
a20741607c | ||
|
|
cbf5e2d75e | ||
|
|
6aeae3c73f | ||
|
|
9ebd35f90f | ||
|
|
1004a05eaa | ||
|
|
614fcc658d | ||
|
|
c238de8a65 | ||
|
|
cbbcca72e0 | ||
|
|
9e4e764779 | ||
|
|
617d7ec421 | ||
|
|
12216641af | ||
|
|
2b0f668f18 | ||
|
|
924575106e | ||
|
|
91015a7239 | ||
|
|
70ecb7be40 | ||
|
|
2343fbba23 | ||
|
|
4324d2cf23 | ||
|
|
8bf4b08540 | ||
|
|
519002ff91 | ||
|
|
3666764226 | ||
|
|
c4cbe6e4e9 | ||
|
|
15b7d4b5e4 | ||
|
|
d2378bf66c | ||
|
|
aff514fa86 | ||
|
|
640f2e8cdc | ||
|
|
dfa2544b6c | ||
|
|
3200f0345a | ||
|
|
e215762942 | ||
|
|
46125e05e3 | ||
|
|
4872e2ccdb | ||
|
|
2c468dabe8 | ||
|
|
3319d21c86 | ||
|
|
b55ef0ee29 | ||
|
|
30f2d169c2 | ||
|
|
2ae6b6dc76 | ||
|
|
47df2405ab | ||
|
|
d83e909f9f | ||
|
|
b27f452d03 | ||
|
|
bd43bb65bd | ||
|
|
62c5ca50a0 | ||
|
|
e503097a49 | ||
|
|
aeb60e0a3d | ||
|
|
fef732420a | ||
|
|
c5f20f47ab | ||
|
|
0a561b574b | ||
|
|
b17d5f4910 | ||
|
|
9e0d6c150a | ||
|
|
13fb3c9c1d | ||
|
|
4ba71f7b9c | ||
|
|
df4de6092e | ||
|
|
f101524423 | ||
|
|
b6c80dfccb | ||
|
|
20786fc296 | ||
|
|
66553b3506 | ||
|
|
cb28a431c8 | ||
|
|
b6f08fc75c | ||
|
|
de409f5c9b | ||
|
|
653cf3924d | ||
|
|
c73da42f4b | ||
|
|
dbc8aa7d48 | ||
|
|
ae517b2bca | ||
|
|
61d9746b1c | ||
|
|
c869387f1a | ||
|
|
747efb35a6 | ||
|
|
47ccb38f20 | ||
|
|
83a87787c6 | ||
|
|
7d628a5639 | ||
|
|
fdfc976633 | ||
|
|
bd85e24f45 | ||
|
|
62a3e32c4a | ||
|
|
e23bc10821 | ||
|
|
dd96115ddf | ||
|
|
4511b8a5cb | ||
|
|
7b4a5d4aea | ||
|
|
f484df66de | ||
|
|
6ebe2bd8f2 | ||
|
|
e26a5eecda | ||
|
|
33c89ec034 | ||
|
|
11cee9e911 | ||
|
|
6d9e7c41ff | ||
|
|
9d56a60d85 | ||
|
|
47294883d4 | ||
|
|
3ed7f7b7cb | ||
|
|
6f45f0e837 | ||
|
|
2826102030 | ||
|
|
979e7e36ca | ||
|
|
c9edbcd537 | ||
|
|
41ab0167fd | ||
|
|
e9110c008b | ||
|
|
244b648cc4 | ||
|
|
8f8fa9d27c | ||
|
|
a3454600b6 | ||
|
|
13d61e9917 | ||
|
|
a2699d4aa5 | ||
|
|
de1e01befc | ||
|
|
6d88667e84 | ||
|
|
189e57028d | ||
|
|
7892df8484 | ||
|
|
7f9fac974c | ||
|
|
86cd238314 | ||
|
|
bb52fcc61d | ||
|
|
30e01c3741 | ||
|
|
ae2d7fbd6a | ||
|
|
49bc08e485 | ||
|
|
cb34b575a7 | ||
|
|
ec6ab9ddb6 | ||
|
|
a93ff42551 | ||
|
|
7949b536ab | ||
|
|
b456c44861 | ||
|
|
caf2d93632 | ||
|
|
a5eed610aa | ||
|
|
905a2832f2 | ||
|
|
592ac2fb0e | ||
|
|
0f1cf770cc | ||
|
|
8d8b18e5bd | ||
|
|
736dfecc0c | ||
|
|
4679fc0ddf | ||
|
|
5956e7f1a0 | ||
|
|
d8cb522055 | ||
|
|
a728ac7339 | ||
|
|
fcf45975df | ||
|
|
2a5375f4ea | ||
|
|
b3a3679a6b | ||
|
|
9fdfca486a | ||
|
|
54400a2161 | ||
|
|
e0521c140d | ||
|
|
dcb66ee989 | ||
|
|
c0f7cf77cb | ||
|
|
c4d6e766fa | ||
|
|
dbbda43758 | ||
|
|
054b49abde | ||
|
|
1fdd941c0a | ||
|
|
cba7f20546 | ||
|
|
8d58343954 | ||
|
|
8543c18079 | ||
|
|
47d0b7e9bf | ||
|
|
db874ff8b1 | ||
|
|
b49cf5cd28 | ||
|
|
0acdb4b98a | ||
|
|
d282ff71d1 | ||
|
|
f89ea705e2 | ||
|
|
fca3070045 | ||
|
|
f32bf8b6da | ||
|
|
5d58199abc | ||
|
|
7cc495d54e | ||
|
|
87379fea88 | ||
|
|
34c213f56a | ||
|
|
04e4c64efe | ||
|
|
a23fd8b12a | ||
|
|
4be3f45228 | ||
|
|
d17064f67f | ||
|
|
aad1382418 | ||
|
|
f7885eed69 | ||
|
|
008ddd57f3 | ||
|
|
0048a58b26 | ||
|
|
89bd10bd84 | ||
|
|
ff0db3a97c | ||
|
|
bd8a941f50 | ||
|
|
8353418232 | ||
|
|
26784d6969 | ||
|
|
a1d56a1f17 | ||
|
|
92512fd052 | ||
|
|
933f4722e9 | ||
|
|
4870434673 | ||
|
|
bcdff6eeb0 | ||
|
|
1cb1dec45b | ||
|
|
316124258f | ||
|
|
44997263f1 | ||
|
|
83d34f8df5 | ||
|
|
42e1b7260a | ||
|
|
d4e0fcecb9 | ||
|
|
5dbfc57d3c | ||
|
|
5f2a14bc63 | ||
|
|
a049989155 | ||
|
|
ff56a03fb6 | ||
|
|
9a74219dfd | ||
|
|
2b54576f05 | ||
|
|
fe5c310556 | ||
|
|
d299d9ae5e | ||
|
|
fa788cf600 | ||
|
|
7aea26c8a6 | ||
|
|
0d690c922a | ||
|
|
3c74585d48 | ||
|
|
083867dc77 | ||
|
|
06dd7f0821 | ||
|
|
74fadbc4cc | ||
|
|
838ffae9a6 | ||
|
|
5b159a7fb4 | ||
|
|
3ab1d7055e | ||
|
|
5c57c20d20 | ||
|
|
98fd99bced | ||
|
|
c17606cc0a | ||
|
|
064b31a641 | ||
|
|
769c1d91ee | ||
|
|
dffaae7cce | ||
|
|
44c0ba5eaf | ||
|
|
e6586b196b | ||
|
|
abcbf1a5de | ||
|
|
51ad2ea126 | ||
|
|
12caf3f4bf | ||
|
|
2265cf05f3 | ||
|
|
d8b94d4335 | ||
|
|
8db8b631da | ||
|
|
0e6fab7bf7 | ||
|
|
2b0bd7896e | ||
|
|
a2a9d0aca1 | ||
|
|
59bed07eca | ||
|
|
e9673bd1a4 | ||
|
|
780b708d49 | ||
|
|
915c9f7837 | ||
|
|
775eb7c83b | ||
|
|
1b94b0a4cc | ||
|
|
bc9d85b650 | ||
|
|
14564d06d8 | ||
|
|
7fd57f9097 | ||
|
|
a32eddc4d4 | ||
|
|
2581a9de2a | ||
|
|
82d0155b4e | ||
|
|
84d500c89c | ||
|
|
6c323097b6 | ||
|
|
4a6d1b4732 | ||
|
|
3279928c9d | ||
|
|
01ac9f4ff2 | ||
|
|
c2f7e69a59 | ||
|
|
546ef1305e | ||
|
|
d0c7668d34 | ||
|
|
68765805be | ||
|
|
6a15aaa42f | ||
|
|
c27de4875c | ||
|
|
71c0c84383 | ||
|
|
e94c50a224 | ||
|
|
7106728280 | ||
|
|
c24bc644e4 | ||
|
|
2ab14ab1ba | ||
|
|
92eb7b1b38 | ||
|
|
f4a717e9b8 | ||
|
|
208bd9c4b9 | ||
|
|
8c6594216f | ||
|
|
c4aa0e2ad2 | ||
|
|
28380a9517 | ||
|
|
8d8bfc5585 | ||
|
|
74aa6d7121 | ||
|
|
908834465e | ||
|
|
0bd99af9de | ||
|
|
061086165f | ||
|
|
cf978614db | ||
|
|
69fb59812a | ||
|
|
dfe010710b | ||
|
|
09027a5c97 | ||
|
|
578a104a92 | ||
|
|
b066cff0b3 | ||
|
|
d348680dc6 | ||
|
|
a4a51da68a | ||
|
|
16ec6da83f | ||
|
|
35125d3e41 | ||
|
|
0c502c56ff | ||
|
|
d922d0f363 | ||
|
|
d5fbf1869e | ||
|
|
7567a4669b | ||
|
|
4a368b6279 | ||
|
|
f0feb3920a | ||
|
|
6e264c2cbd | ||
|
|
c2fef16e7f | ||
|
|
98af1ee0f1 | ||
|
|
a014e6987d | ||
|
|
80fbee033f | ||
|
|
aa03d3300a | ||
|
|
2fda3845b0 | ||
|
|
2ab6ff4284 | ||
|
|
4937e38996 | ||
|
|
29994d5a47 | ||
|
|
5d36da146c | ||
|
|
c8abf7a184 | ||
|
|
f5ca95e8a8 | ||
|
|
6f6a258db1 | ||
|
|
91b9623260 | ||
|
|
594b253883 | ||
|
|
465216f223 |
@@ -13,6 +13,7 @@ LICENSE=
|
||||
# NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||
|
||||
NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||
NEXT_PUBLIC_API_V2_URL=http://localhost:5555/api/v2
|
||||
|
||||
# Configure NEXTAUTH_URL manually if needed, otherwise it will resolve to {NEXT_PUBLIC_WEBAPP_URL}/api/auth
|
||||
# NEXTAUTH_URL=http://localhost:3000/api/auth
|
||||
@@ -32,6 +33,9 @@ POSTGRES_PASSWORD=magical_password
|
||||
POSTGRES_DB=calendso
|
||||
DATABASE_HOST=database:5432
|
||||
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
||||
# Needed to run migrations while using a connection pooler like PgBouncer
|
||||
# Use the same one as DATABASE_URL if you're not using a connection pooler
|
||||
DATABASE_DIRECT_URL=${DATABASE_URL}
|
||||
GOOGLE_API_CREDENTIALS={}
|
||||
|
||||
# Set this to '1' if you don't want Cal to collect anonymous usage
|
||||
|
||||
60
.github/workflows/create-release.yaml
vendored
Normal file
60
.github/workflows/create-release.yaml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
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: |
|
||||
const isPreRelease = '${{ inputs.RELEASE_TAG }}'.includes('-rc');
|
||||
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: isPreRelease,
|
||||
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);
|
||||
}
|
||||
117
.github/workflows/docker-build-push-dockerhub.yml
vendored
117
.github/workflows/docker-build-push-dockerhub.yml
vendored
@@ -17,6 +17,11 @@ on:
|
||||
- completed
|
||||
# Allow running workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
# Uncomment below to allow specific version workflow run
|
||||
# inputs:
|
||||
# version:
|
||||
# description: 'Version to build'
|
||||
# required: true
|
||||
|
||||
# Leaving in example for releases. Initially we simply push to 'latest'
|
||||
# on:
|
||||
@@ -32,16 +37,27 @@ jobs:
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
# Free about 4.5 GB, elminating our disk space issues
|
||||
tool-cache: true
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it, uncomment below
|
||||
# - name: Checkout code at specified version
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# ref: ${{ github.event.inputs.version }}
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Git submodule update
|
||||
run: |
|
||||
git submodule update --init
|
||||
|
||||
- name: Log in to the Docker Hub registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
# Username used to log against the Docker registry
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
@@ -51,20 +67,23 @@ jobs:
|
||||
logout: true # optional, default is true
|
||||
|
||||
- name: Log in to the Github Container registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
docker.io/calendso/calendso
|
||||
docker.io/calcom/cal.com
|
||||
ghcr.io/calcom/cal.com
|
||||
# Add flavor latest only on full releases, not on pre-releases
|
||||
flavor: |
|
||||
latest=${{ !github.event.release.prerelease }}
|
||||
|
||||
- name: Copy env
|
||||
run: |
|
||||
@@ -80,9 +99,9 @@ jobs:
|
||||
- name: Start database
|
||||
run: |
|
||||
docker compose up -d database
|
||||
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: |
|
||||
network=container:database
|
||||
@@ -91,30 +110,90 @@ jobs:
|
||||
# config-inline: |
|
||||
# [worker.oci]
|
||||
# max-parallelism = 1
|
||||
|
||||
- name: Build and push image
|
||||
|
||||
- name: Build image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
load: true # Load the image into the Docker daemon
|
||||
push: false # Do not push the image at this stage
|
||||
platforms: linux/amd64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }}
|
||||
NEXT_PUBLIC_API_V2_URL=${{ env.NEXT_PUBLIC_API_V2_URL }}
|
||||
NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}
|
||||
NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }}
|
||||
DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||
|
||||
# - name: Build with docker compose
|
||||
# run: |
|
||||
# DOCKER_BUILDKIT=0 docker compose build --build-arg DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }} calcom
|
||||
DATABASE_DIRECT_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||
|
||||
- name: Test runtime
|
||||
run: |
|
||||
tags="${{ steps.meta.outputs.tags }}"
|
||||
IFS=',' read -ra ADDR <<< "$tags" # Convert string to array using ',' as delimiter
|
||||
tag=${ADDR[0]} # Get the first tag
|
||||
|
||||
docker run --rm --network stack \
|
||||
-p 3000:3000 \
|
||||
-e DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@database/${{ env.POSTGRES_DB }} \
|
||||
-e DATABASE_DIRECT_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@database/${{ env.POSTGRES_DB }} \
|
||||
-e NEXTAUTH_SECRET=${{ env.NEXTAUTH_SECRET }} \
|
||||
-e CALENDSO_ENCRYPTION_KEY=${{ env.CALENDSO_ENCRYPTION_KEY }} \
|
||||
$tag &
|
||||
|
||||
server_pid=$!
|
||||
|
||||
|
||||
echo "Waiting for the server to start..."
|
||||
sleep 120
|
||||
|
||||
echo ${{ env.NEXT_PUBLIC_WEBAPP_URL }}/auth/login
|
||||
|
||||
for i in {1..60}; do
|
||||
echo "Checking server health ($i/60)..."
|
||||
response=$(curl -o /dev/null -s -w "%{http_code}" ${{ env.NEXT_PUBLIC_WEBAPP_URL }}/auth/login)
|
||||
echo "HTTP Status Code: $response"
|
||||
if [[ "$response" == "200" ]] || [[ "$response" == "307" ]]; then
|
||||
echo "Server is healthy"
|
||||
# Now, shutdown the server
|
||||
kill $server_pid
|
||||
exit 0
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Server health check failed"
|
||||
kill $server_pid
|
||||
exit 1
|
||||
env:
|
||||
NEXTAUTH_SECRET: 'EI4qqDpcfdvf4A+0aQEEx8JjHxHSy4uWiZw/F32K+pA='
|
||||
CALENDSO_ENCRYPTION_KEY: '0zfLtY99wjeLnsM7qsa8xsT+Q0oSgnOL'
|
||||
|
||||
- name: Push image
|
||||
id: docker_push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }}
|
||||
NEXT_PUBLIC_API_V2_URL=${{ env.NEXT_PUBLIC_API_V2_URL }}
|
||||
NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}
|
||||
NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }}
|
||||
DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||
DATABASE_DIRECT_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||
if: ${{ !github.event.release.prerelease }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
docker compose down
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
20
Dockerfile
20
Dockerfile
@@ -8,11 +8,14 @@ ARG DATABASE_URL
|
||||
ARG NEXTAUTH_SECRET=secret
|
||||
ARG CALENDSO_ENCRYPTION_KEY=secret
|
||||
ARG MAX_OLD_SPACE_SIZE=4096
|
||||
ARG NEXT_PUBLIC_API_V2_URL
|
||||
|
||||
ENV NEXT_PUBLIC_WEBAPP_URL=http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER \
|
||||
NEXT_PUBLIC_API_V2_URL=$NEXT_PUBLIC_API_V2_URL \
|
||||
NEXT_PUBLIC_LICENSE_CONSENT=$NEXT_PUBLIC_LICENSE_CONSENT \
|
||||
CALCOM_TELEMETRY_DISABLED=$CALCOM_TELEMETRY_DISABLED \
|
||||
DATABASE_URL=$DATABASE_URL \
|
||||
DATABASE_DIRECT_URL=$DATABASE_URL \
|
||||
NEXTAUTH_SECRET=${NEXTAUTH_SECRET} \
|
||||
CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \
|
||||
NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE}
|
||||
@@ -20,15 +23,16 @@ ENV NEXT_PUBLIC_WEBAPP_URL=http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER \
|
||||
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/.yarn ./.yarn
|
||||
COPY calcom/apps/web ./apps/web
|
||||
COPY calcom/apps/api/v2 ./apps/api/v2
|
||||
COPY calcom/packages ./packages
|
||||
COPY calcom/tests ./tests
|
||||
|
||||
RUN yarn config set httpTimeout 1200000 && \
|
||||
npx turbo prune --scope=@calcom/web --docker && \
|
||||
yarn install && \
|
||||
yarn db-deploy && \
|
||||
yarn --cwd packages/prisma seed-app-store
|
||||
|
||||
RUN yarn turbo run build --filter=@calcom/web
|
||||
RUN yarn config set httpTimeout 1200000
|
||||
RUN npx turbo prune --scope=@calcom/web --docker
|
||||
RUN yarn install
|
||||
RUN yarn db-deploy
|
||||
RUN yarn --cwd packages/prisma seed-app-store
|
||||
RUN yarn --cwd apps/web workspace @calcom/web run build
|
||||
|
||||
# RUN yarn plugin import workspace-tools && \
|
||||
# yarn workspaces focus --all --production
|
||||
@@ -71,4 +75,4 @@ 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"]
|
||||
|
||||
32
README.md
32
README.md
@@ -67,24 +67,24 @@ If you are evaluating Cal.com or running with minimal to no modifications, this
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
Most configurations can be left as-is, but for configuration options see [Important Run-time variables](#important-run-time-variables) below.
|
||||
|
||||
Most configurations can be left as-is, but for configuration options see [Important Run-time variables](#important-run-time-variables) below.
|
||||
|
||||
Update the appropriate values in your .env file, then proceed.
|
||||
|
||||
|
||||
4. (optional) Pre-Pull the images by running the following command:
|
||||
|
||||
|
||||
```bash
|
||||
docker compose pull
|
||||
```
|
||||
|
||||
|
||||
This will use the default image locations as specified by `image:` in the docker-compose.yaml file.
|
||||
|
||||
|
||||
Note: To aid with support, by default Scarf.sh is used as registry proxy for download metrics.
|
||||
|
||||
|
||||
5. Start Cal.com via docker compose
|
||||
|
||||
(Most basic users, and for First Run) To run the complete stack, which includes a local Postgres database, Cal.com web app, and Prisma Studio:
|
||||
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
@@ -139,7 +139,7 @@ If you are evaluating Cal.com or running with minimal to no modifications, this
|
||||
cd calcom-docker
|
||||
```
|
||||
|
||||
3. Update the calcom submodule.
|
||||
3. Update the calcom submodule.
|
||||
|
||||
```bash
|
||||
git submodule update --remote --init
|
||||
@@ -151,7 +151,7 @@ If you are evaluating Cal.com or running with minimal to no modifications, this
|
||||
|
||||
For configuration options see [Build-time variables](#build-time-variables) below. Update the appropriate values in your .env file, then proceed.
|
||||
|
||||
5. Build the Cal.com docker image:
|
||||
5. Build the Cal.com docker image:
|
||||
|
||||
Note: Due to application configuration requirements, an available database is currently required during the build process.
|
||||
|
||||
@@ -206,20 +206,22 @@ These variables must also be provided at runtime
|
||||
| NEXTAUTH_URL | Location of the auth server. By default, this is the Cal.com docker instance itself. | optional | `{NEXT_PUBLIC_WEBAPP_URL}/api/auth` |
|
||||
| NEXTAUTH_SECRET | must match build variable | required | `secret` |
|
||||
| CALENDSO_ENCRYPTION_KEY | must match build variable | required | `secret` |
|
||||
| DATABASE_URL | database url with credentials | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` |
|
||||
| DATABASE_URL | database url with credentials - if using a connection pooler, this setting should point there | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` |
|
||||
| DATABASE_DIRECT_URL | direct database url with credentials if using a connection pooler (e.g. PgBouncer, Prisma Accelerate, etc.) | optional | |
|
||||
|
||||
### Build-time variables
|
||||
|
||||
If building the image yourself, these variables must be provided at the time of the docker build, and can be provided by updating the .env file. Currently, if you require changes to these variables, you must follow the instructions to build and publish your own image.
|
||||
If building the image yourself, these variables must be provided at the time of the docker build, and can be provided by updating the .env file. Currently, if you require changes to these variables, you must follow the instructions to build and publish your own image.
|
||||
|
||||
Updating these variables is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the [cal.com instructions](https://github.com/calcom/cal.com)
|
||||
Updating these variables is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the [cal.com instructions](https://github.com/calcom/cal.com)
|
||||
|
||||
| Variable | Description | Required | Default |
|
||||
| --- | --- | --- | --- |
|
||||
| NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files | optional | `http://localhost:3000` |
|
||||
| NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | | |
|
||||
| CALCOM_TELEMETRY_DISABLED | Allow cal.com to collect anonymous usage data (set to `1` to disable) | | |
|
||||
| DATABASE_URL | database url with credentials | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` |
|
||||
| DATABASE_URL | database url with credentials - if using a connection pooler, this setting should point there | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` |
|
||||
| DATABASE_DIRECT_URL | direct database url with credentials if using a connection pooler (e.g. PgBouncer, Prisma Accelerate, etc.) | optional | |
|
||||
| NEXTAUTH_SECRET | Cookie encryption key | required | `secret` |
|
||||
| CALENDSO_ENCRYPTION_KEY | Authentication encryption key | required | `secret` |
|
||||
|
||||
@@ -249,7 +251,7 @@ Certain versions may have trouble creating a user if the field `metadata` is emp
|
||||
|
||||
If you experience this error, it may be the way the default Auth callback in the server is using the WEBAPP_URL as a base url. The container does not necessarily have access to the same DNS as your local machine, and therefor needs to be configured to resolve to itself. You may be able to correct this by configuring `NEXTAUTH_URL=http://localhost:3000/api/auth`, to help the backend loop back to itself.
|
||||
```
|
||||
docker-calcom-1 | @calcom/web:start: [next-auth][error][CLIENT_FETCH_ERROR]
|
||||
docker-calcom-1 | @calcom/web:start: [next-auth][error][CLIENT_FETCH_ERROR]
|
||||
docker-calcom-1 | @calcom/web:start: https://next-auth.js.org/errors#client_fetch_error request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost {
|
||||
docker-calcom-1 | @calcom/web:start: error: {
|
||||
docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost',
|
||||
|
||||
2
calcom
2
calcom
Submodule calcom updated: 1929d5c7d4...0ec5153f14
@@ -27,11 +27,13 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
NEXT_PUBLIC_WEBAPP_URL: ${NEXT_PUBLIC_WEBAPP_URL}
|
||||
NEXT_PUBLIC_API_V2_URL: ${NEXT_PUBLIC_API_V2_URL}
|
||||
NEXT_PUBLIC_LICENSE_CONSENT: ${NEXT_PUBLIC_LICENSE_CONSENT}
|
||||
CALCOM_TELEMETRY_DISABLED: ${CALCOM_TELEMETRY_DISABLED}
|
||||
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
|
||||
CALENDSO_ENCRYPTION_KEY: ${CALENDSO_ENCRYPTION_KEY}
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
DATABASE_DIRECT_URL: ${DATABASE_URL}
|
||||
network: stack
|
||||
restart: always
|
||||
networks:
|
||||
@@ -41,6 +43,7 @@ services:
|
||||
env_file: .env
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
||||
- DATABASE_DIRECT_URL=${DATABASE_URL}
|
||||
depends_on:
|
||||
- database
|
||||
|
||||
@@ -55,6 +58,7 @@ services:
|
||||
env_file: .env
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
||||
- DATABASE_DIRECT_URL=${DATABASE_URL}
|
||||
depends_on:
|
||||
- database
|
||||
command:
|
||||
|
||||
Reference in New Issue
Block a user