75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
kind: pipeline
|
|
name: default
|
|
type: docker
|
|
|
|
steps:
|
|
- name: download source
|
|
image: plugins/download
|
|
settings:
|
|
source: https://github.com/calcom/cal.com/archive/refs/tags/v3.1.7.tar.gz
|
|
destination: source.tar.gz
|
|
- name: download docker repo
|
|
image: plugins/download
|
|
settings:
|
|
source: https://github.com/calcom/docker/archive/refs/heads/main.tar.gz
|
|
destination: docker.tar.gz
|
|
- name: extract source
|
|
image: alpine
|
|
commands:
|
|
- mkdir calcom
|
|
- tar --strip-components 1 -C calcom -xzf source.tar.gz
|
|
- mkdir docker
|
|
- tar --strip-components 1 -C docker -xzf docker.tar.gz
|
|
- mv docker/.dockerignore .
|
|
- mkdir -p build/apps
|
|
- name: prepare build workspace
|
|
image: alpine/git
|
|
commands:
|
|
- git init calcom
|
|
- name: build
|
|
image: node:18
|
|
environment:
|
|
NEXT_PUBLIC_WEBAPP_URL: https://cal.smcm.xyz
|
|
NEXT_PUBLIC_APP_URL: https://cal.smcm.xyz
|
|
NEXT_PUBLIC_LICENSE_CONSENT: agree
|
|
CALCOM_TELEMETRY_DISABLED: 1
|
|
NEXTAUTH_SECRET:
|
|
from_secret: nextauth_secret
|
|
CALENDSO_ENCRYPTION_KEY:
|
|
from_secret: calendso_encryption_key
|
|
DATABASE_URL: postgresql://unicorn_user:magical_password@postgres/calendso
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
YARN_ENABLE_IMMUTABLE_INSTALLS: "false"
|
|
commands:
|
|
- cd calcom
|
|
- yarn config set httpTimeout 1200000
|
|
- npx turbo prune --scope=@calcom/web --docker
|
|
- yarn install
|
|
- yarn db-deploy
|
|
- yarn --cwd packages/prisma seed-app-store
|
|
- yarn turbo run build --filter=@calcom/web
|
|
- rm -rf node_modules/.cache .yarn/cache apps/web/.next/cache
|
|
- name: publish
|
|
image: plugins/docker
|
|
settings:
|
|
repo: cr.smcm.xyz/calendso/calendso
|
|
tags:
|
|
- latest
|
|
- ${DRONE_COMMIT_SHA}
|
|
|
|
services:
|
|
- name: postgres
|
|
image: postgres
|
|
environment:
|
|
POSTGRES_USER: unicorn_user
|
|
POSTGRES_PASSWORD: magical_password
|
|
POSTGRES_DB: calendso
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
- custom
|
|
- cron
|