Compare commits

...

62 Commits

Author SHA1 Message Date
Colin Griffin
04f97c34c8 add arm-specific build with -arm suffix 2023-07-03 10:21:00 -04:00
Colin Griffin
03569bcc72 test tmpfs for build 2023-06-11 17:07:27 -04:00
Colin Griffin
408c36a221 try tmpfs 2023-06-11 12:14:05 -04:00
Colin Griffin
1315026fb4 re-add qemu for testing amd64 2023-06-11 11:17:09 -04:00
Colin Griffin
f2cdcb69d3 add suffix for arm 2023-06-11 10:17:52 -04:00
Colin Griffin
1cadb680b9 allow push for testing 2023-06-10 10:42:34 -04:00
Colin Griffin
9ff79941ba remove platform designation from runner stage 2023-06-10 10:41:12 -04:00
Colin Griffin
9a04fe8697 update targetplatform to allow multi-arch 2023-06-10 09:59:10 -04:00
Colin Griffin
facc5178ce update platforms and disable push 2023-06-10 09:26:18 -04:00
Colin Griffin
0bbe3ed1a1 Update Dockerfile 2023-06-10 09:21:34 -04:00
actions-user
15043e209b Auto updated submodule references 2023-06-10 04:04:18 +00:00
actions-user
a99a2d791a Auto updated submodule references 2023-06-09 04:04:41 +00:00
actions-user
c812c07076 Auto updated submodule references 2023-06-08 04:04:27 +00:00
actions-user
659c4a3dd0 Auto updated submodule references 2023-06-07 04:04:32 +00:00
actions-user
e7d50ea0e8 Auto updated submodule references 2023-06-06 04:04:17 +00:00
actions-user
d1841b2287 Auto updated submodule references 2023-06-05 04:04:04 +00:00
Colin Griffin
a24104bbc7 Merge pull request #248 from calcom/fix/max-parallelism
Update docker-build-push-dockerhub.yml
2023-06-04 13:04:53 -04:00
Colin Griffin
eb5ac7b4be Update docker-build-push-dockerhub.yml 2023-06-04 13:04:39 -04:00
Colin Griffin
9cda60d822 Merge pull request #193 from calcom/fix/enable-arm
Re-introduce ARM build
2023-06-04 02:15:41 -04:00
Colin Griffin
ed9f386e22 re-enable image push 2023-06-04 02:11:16 -04:00
Colin Griffin
deaadc84ac limit to 1 concurrent docker runner 2023-06-04 02:09:07 -04:00
Colin Griffin
8892507e29 add dependabot and update actions deps 2023-06-04 00:10:32 -04:00
actions-user
1e6ef72a1c Auto updated submodule references 2023-06-04 04:04:01 +00:00
Colin Griffin
62310b0207 remove amd64 2023-06-03 23:04:46 -04:00
Colin Griffin
377964da71 fix docker-compose command (remove hyphen) 2023-06-03 22:22:31 -04:00
Colin Griffin
b93882f36f resolve conflicts 2023-06-03 21:35:15 -04:00
Colin Griffin
ea9679f32c update calcom 2023-06-03 21:03:47 -04:00
Colin Griffin
59f7b813c2 fix docker compose command syntax 2023-06-03 13:56:30 -04:00
Colin Griffin
cd8c092600 add context for builder 2023-06-03 13:56:30 -04:00
Colin Griffin
69721634ab temporarily remove amd64 2023-06-03 13:56:28 -04:00
Colin Griffin
9315c39cdc enable push 2023-06-03 13:56:09 -04:00
Colin Griffin
c4ec75c4af Update docker-build-push-dockerhub.yml
use legacy docker-compose temporarily
2023-06-03 13:55:42 -04:00
Colin Griffin
d0fb4247e5 test local runner 2023-06-03 13:55:26 -04:00
Colin Griffin
d4d7fdbae6 move to self-hosted 2023-06-03 13:55:26 -04:00
Colin Griffin
c652cac1bd update arm64 2023-06-03 13:54:13 -04:00
actions-user
6a143526da Auto updated submodule references 2023-06-03 04:04:23 +00:00
actions-user
98e87102a4 Auto updated submodule references 2023-06-02 04:04:17 +00:00
actions-user
2c1575a47a Auto updated submodule references 2023-06-01 04:05:18 +00:00
actions-user
c027380ecb Auto updated submodule references 2023-05-31 04:04:14 +00:00
actions-user
720639b2ea Auto updated submodule references 2023-05-30 04:04:28 +00:00
actions-user
db2d9dc08e Auto updated submodule references 2023-05-27 04:04:23 +00:00
actions-user
5d0489bf13 Auto updated submodule references 2023-05-26 04:04:22 +00:00
actions-user
6c54c87dfc Auto updated submodule references 2023-05-25 04:04:09 +00:00
actions-user
7fbffa6094 Auto updated submodule references 2023-05-24 04:04:18 +00:00
actions-user
7528e9d0f0 Auto updated submodule references 2023-05-23 04:04:32 +00:00
actions-user
09839f367f Auto updated submodule references 2023-05-22 04:04:11 +00:00
actions-user
21ac156d00 Auto updated submodule references 2023-05-21 04:04:19 +00:00
actions-user
15d7c1cf09 Auto updated submodule references 2023-05-20 04:04:18 +00:00
actions-user
5636ea9001 Auto updated submodule references 2023-05-19 04:04:29 +00:00
actions-user
d7933ece19 Auto updated submodule references 2023-05-18 04:04:23 +00:00
actions-user
b329667c8a Auto updated submodule references 2023-05-17 04:04:09 +00:00
actions-user
730bdd0faf Auto updated submodule references 2023-05-16 04:04:14 +00:00
actions-user
0aaa480367 Auto updated submodule references 2023-05-15 04:04:28 +00:00
actions-user
0dab29dfed Auto updated submodule references 2023-05-14 04:04:24 +00:00
actions-user
9486648e4e Auto updated submodule references 2023-05-13 04:04:17 +00:00
actions-user
e2b95b8f61 Auto updated submodule references 2023-05-12 04:04:42 +00:00
actions-user
5d74a43453 Auto updated submodule references 2023-05-11 04:04:23 +00:00
actions-user
47966b5c26 Auto updated submodule references 2023-05-10 04:04:12 +00:00
actions-user
9359793032 Auto updated submodule references 2023-05-09 04:04:24 +00:00
actions-user
59ad397832 Auto updated submodule references 2023-05-07 04:04:25 +00:00
actions-user
18cfe50f5f Auto updated submodule references 2023-05-06 04:04:17 +00:00
actions-user
e9ede520ba Auto updated submodule references 2023-05-05 04:04:18 +00:00
5 changed files with 152 additions and 22 deletions

7
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View File

@@ -0,0 +1,123 @@
# This is a basic workflow to help you get started with Actions
name: Build and push ARM image to DockerHub
# Controls when the workflow will run
on:
push:
branches:
- 'main'
tags:
- 'v*'
# update on run of Update Calendso nightly submodule update
workflow_run:
workflows: ["Update Calendso"]
branches: [main]
types:
- completed
# Allow running workflow manually from the Actions tab
workflow_dispatch:
# Leaving in example for releases. Initially we simply push to 'latest'
# on:
# release:
# types: [ created ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: self-hosted
# 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: checkout
uses: actions/checkout@v3
- name: Git submodule update
run: |
git submodule update --init
- name: Log in to the Docker Hub registry
uses: docker/login-action@v2
with:
# Username used to log against the Docker registry
username: ${{ secrets.DOCKER_HUB_USERNAME }}
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.DOCKER_HUB_TOKEN }}
# Log out from the Docker registry at the end of a job
logout: true # optional, default is true
- name: Log in to the Github Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
flavor: |
suffix=-arm
images: |
docker.io/calendso/calendso
docker.io/calcom/cal.com
ghcr.io/calcom/cal.com
- name: Copy env
run: |
grep -o '^[^#]*' .env.example > .env
cat .env >> $GITHUB_ENV
echo "DATABASE_HOST=localhost:5432" >> $GITHUB_ENV
eval $(sed -e '/^#/d' -e 's/^/export /' -e 's/$/;/' .env) ;
# Temporarily disable ARM build due to runner performance issues
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
- name: Start database
run: |
docker compose up -d database
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
driver-opts: |
network=container:database
buildkitd-flags: |
--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
# config-inline: |
# [worker.oci]
# max-parallelism = 1
- name: Build and push image
id: docker_build
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_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
- name: Cleanup
run: |
docker compose down
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

View File

@@ -23,28 +23,25 @@ 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"
build: build:
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: ubuntu-latest runs-on: self-hosted
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
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@v2 uses: actions/checkout@v3
- 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@v1.10.0 uses: docker/login-action@v2
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 }}
@@ -54,7 +51,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@v1.10.0 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
@@ -64,6 +61,8 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
flavor: |
suffix=-arm
images: | images: |
docker.io/calendso/calendso docker.io/calendso/calendso
docker.io/calcom/cal.com docker.io/calcom/cal.com
@@ -77,8 +76,8 @@ jobs:
eval $(sed -e '/^#/d' -e 's/^/export /' -e 's/$/;/' .env) ; eval $(sed -e '/^#/d' -e 's/^/export /' -e 's/$/;/' .env) ;
# Temporarily disable ARM build due to runner performance issues # Temporarily disable ARM build due to runner performance issues
# - name: Set up QEMU - name: Set up QEMU
# uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
- name: Start database - name: Start database
run: | run: |
@@ -87,19 +86,23 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with: with:
platforms: linux/amd64,linux/arm64
driver-opts: | driver-opts: |
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@v3 uses: docker/build-push-action@v4
with: with:
context: ./ context: ./
file: ./Dockerfile file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64 platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
build-args: | build-args: |
@@ -107,10 +110,6 @@ jobs:
NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }} NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}
NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }} 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_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
- name: Cleanup - name: Cleanup
run: | run: |

View File

@@ -1,4 +1,4 @@
FROM node:18 as builder FROM --platform=$BUILDPLATFORM node:18 as builder
WORKDIR /calcom WORKDIR /calcom
@@ -28,13 +28,14 @@ RUN yarn config set httpTimeout 1200000 && \
yarn db-deploy && \ yarn db-deploy && \
yarn --cwd packages/prisma seed-app-store yarn --cwd packages/prisma seed-app-store
RUN yarn turbo run build --filter=@calcom/web RUN --mount=type=tmpfs,destination=/tmp \
yarn turbo run build --filter=@calcom/web
# RUN yarn plugin import workspace-tools && \ # RUN yarn plugin import workspace-tools && \
# yarn workspaces focus --all --production # yarn workspaces focus --all --production
RUN rm -rf node_modules/.cache .yarn/cache apps/web/.next/cache RUN rm -rf node_modules/.cache .yarn/cache apps/web/.next/cache
FROM node:18 as builder-two FROM --platform=$BUILDPLATFORM 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
@@ -55,10 +56,10 @@ ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL BUILT_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}
ARG TARGETPLATFORM
ARG TARGETARCH
FROM node:18 as runner FROM node:18 as runner
WORKDIR /calcom WORKDIR /calcom
COPY --from=builder-two /calcom ./ COPY --from=builder-two /calcom ./
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000 ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
@@ -67,4 +68,4 @@ ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
ENV NODE_ENV production ENV NODE_ENV production
EXPOSE 3000 EXPOSE 3000
CMD ["/calcom/scripts/start.sh"] CMD ["/calcom/scripts/start.sh"]

2
calcom

Submodule calcom updated: 2b49d96e4a...0d01d3246a