-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
calendso.yml
102 lines (96 loc) · 3.71 KB
/
calendso.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# DOMAIN=example.com docker stack deploy -c calendso.yml calendso
x-calendso: &calendso
environment:
- VERSION=${VERSION:-v4.7.8}
- NODE_ENV=production
- POSTGRES_USER=calendso
- POSTGRES_PASSWORD=myp@ssw0rd
- POSTGRES_DB=calendso
- DATABASE_URL=postgresql://calendso:myp@ssw0rd@postgres:5432/calendso
- NEXT_PUBLIC_WEBAPP_URL=${SCHEME:-https}://${DOMAIN:-calendso.localhost}
- NEXT_PUBLIC_WEBSITE_URL=${SCHEME:-https}://${DOMAIN:-calendso.localhost}
- NEXT_PUBLIC_API_V2_URL=${SCHEME:-https}://${DOMAIN:-calendso.localhost}/api/v2
- NEXTAUTH_URL=${SCHEME:-https}://${DOMAIN:-calendso.localhost}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-mys3cr3t} # openssl rand -base64 32
- NEXT_PUBLIC_IS_E2E=true
- MS_GRAPH_CLIENT_ID=${MS_GRAPH_CLIENT_ID}
- MS_GRAPH_CLIENT_SECRET=${MS_GRAPH_CLIENT_SECRET}
- ZOOM_CLIENT_ID=${ZOOM_CLIENT_ID}
- ZOOM_CLIENT_SECRET=${ZOOM_CLIENT_SECRET}
- EMAIL_FROM=${SMTP_FROM:[email protected]}
- EMAIL_SERVER_HOST=${SMTP_HOST:-smtp.example.com}
- EMAIL_SERVER_PORT=${SMTP_PORT:-587}
- EMAIL_SERVER_USER=${SMTP_USER:-email_user}
- EMAIL_SERVER_PASSWORD=${SMTP_PASSWORD:-password}
- CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY:-mys3cr3t} # openssl rand -base64 24
- CALCOM_TELEMETRY_DISABLED=${CALCOM_TELEMETRY_DISABLED:-1}
- GOOGLE_API_CREDENTIALS=${GOOGLE_API_CREDENTIALS}
- STACK_NAME={{ index .Service.Labels "com.docker.stack.namespace" }}
- DOMAIN=${DOMAIN:-calendso.localhost}
services:
docker:
<<: *calendso
image: docker:dind
entrypoint: /bin/ash
command:
- -c
- |
docker image inspect calendso:$${DOMAIN} && exit 0 > /dev/null 2>&1
apk add git
git clone https://github.com/calcom/docker
cd docker
git checkout $${VERSION}
git submodule update --init
sed -i -e 's/session.data.hasValidLicense/true/g' calcom/packages/features/ee/common/components/LicenseRequired.tsx
DOCKER_BUILDKIT=0 docker build \
--build-arg NEXT_PUBLIC_WEBAPP_URL=$${NEXT_PUBLIC_WEBAPP_URL} \
--build-arg NEXT_PUBLIC_API_V2_URL=$${NEXT_PUBLIC_API_V2_URL} \
--build-arg CALCOM_TELEMETRY_DISABLED=$${CALCOM_TELEMETRY_DISABLED} \
--build-arg NEXTAUTH_SECRET=$${NEXTAUTH_SECRET} \
--build-arg CALENDSO_ENCRYPTION_KEY=$${CALENDSO_ENCRYPTION_KEY} \
--build-arg DATABASE_URL=$${DATABASE_URL} \
--network $${STACK_NAME}_internal \
--no-cache -t calendso:$${DOMAIN} .
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
restart_policy:
condition: on-failure
networks:
- internal
calendso:
<<: *calendso
image: calendso:${DOMAIN-calendso.localhost}
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.calendso-${NUMBER:-1}.rule=Host(`${DOMAIN:-calendso.localhost}`)
- traefik.http.routers.calendso-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.calendso-${NUMBER:-1}.service=calendso-${NUMBER:-1}
- traefik.http.routers.calendso-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.calendso-${NUMBER:-1}.loadbalancer.server.port=3000
networks:
- internal
- traefik
postgres:
image: postgres:14-alpine
environment:
- POSTGRES_DB=calendso
- POSTGRES_USER=calendso
- POSTGRES_PASSWORD=myp@ssw0rd
healthcheck:
test: ["CMD", "pg_isready", "-U", "calendso", "-d", "calendso"]
volumes:
- ${VOLUME_PATH}postgres:/var/lib/postgresql/data
networks:
- internal
- traefik
volumes:
postgres:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net