forked from calcom/docker
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added numerous environment variable changes such as implied defaults that can be overriden. - skipped out on using git modules and just pull repo into build/launch step. Adherance to license requires no repackaging and this solves this. - cleaned up now unnecessary .env file. - recycled environment section using yaml features. - writing a few strings to config path to persist data between container starts that focus on cryptography and secrets. - writing installed commit to the config path in case the end user needs to change the upstream git commit ID to a newer version for detection and automagic upgrades. - added docker-compose.override.yml pattern to .gitignore to allow users to customize their local dev environment if they use docker-compose.yml - wrote a dockerfile/container image which allows for uploading the base container to a private or public docker container registry without breaking the license rules. - left .env ignore in case users wish to continue to use the old method. - updated README.md to include updated simplified instructions. - added start.sh script and wait-for-it.sh into the shell $PATH to allow for a potential future of allowing the main executable (node JS app) to run under a limited privilege user while still allowing the init scripts to be executed securely. - added some input sanitation for certain critical variables. - by default disabled/commented out the studio service as its not to typically be run to enforce better default deployment practices. I would like to figure out what specific query to execute via the CLI instead of running a whole container to establish the first user in the end. - wrote relatively unopinionated docker-compose.yml file to avoid causing problems for people trying to deploy this behind a reverse proxy for potential features such as TLS/HTTPS termination. - upgraded compose version to latest '3.9' to be sure to enable most modern feature set. Fixes calcom#87 by providing a working baseline with sober defaults. Fixes calcom#88 by ensuring consistency across all containers Environment vars. Fixes calcom#93 by allowing users to mount the application files within their IDE workspace, however, this will never solve for any times you will need to run yarn build steps. Fixes calcom#99 by no longer using git submodules and just pulling a single commit depth copy of the ORIGIN repository on app bootstrap/first boot. Fixes calcom#113 by no longer requiring build locally if the community maintainer of the Cal docker repository on GitHub will push this image to the hub. Fixes calcom#121 by removing dependency on BuildKit this is done by simply deploying the app if its detected to be the first execution of this container be it due to no container persistence or a commit version upgrade from ORIGIN. Fixes calcom#128 by removing dep on BuildKit Fixes calcom#123 not replicatable and confirmed to be working in repository shipped state. Fixes calcom#136 by building app on first launch from user define-able envvars which can be defined in numerous ways.
- Loading branch information
Colin
committed
Aug 1, 2022
1 parent
0e50cea
commit 73b2e61
Showing
10 changed files
with
382 additions
and
265 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# .env file | ||
.env | ||
.env | ||
docker-compose.override.yml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,11 @@ | ||
FROM node:16 as builder | ||
|
||
WORKDIR /calcom | ||
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000 | ||
ARG NEXT_PUBLIC_APP_URL | ||
ARG NEXT_PUBLIC_LICENSE_CONSENT | ||
ARG CALCOM_TELEMETRY_DISABLED | ||
ARG DATABASE_URL | ||
ARG NEXTAUTH_SECRET=secret | ||
ARG CALENDSO_ENCRYPTION_KEY=secret | ||
ARG MAX_OLD_SPACE_SIZE=4096 | ||
|
||
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \ | ||
NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL \ | ||
NEXT_PUBLIC_LICENSE_CONSENT=$NEXT_PUBLIC_LICENSE_CONSENT \ | ||
CALCOM_TELEMETRY_DISABLED=$CALCOM_TELEMETRY_DISABLED \ | ||
DATABASE_URL=$DATABASE_URL \ | ||
NEXTAUTH_SECRET=${NEXTAUTH_SECRET} \ | ||
CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \ | ||
NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE} | ||
|
||
COPY calcom/package.json calcom/yarn.lock calcom/turbo.json ./ | ||
COPY calcom/apps/web ./apps/web | ||
COPY calcom/packages ./packages | ||
|
||
RUN yarn install --frozen-lockfile | ||
|
||
RUN yarn build | ||
|
||
FROM node:16 as runner | ||
|
||
WORKDIR /calcom | ||
ENV NODE_ENV production | ||
|
||
RUN apt-get update && \ | ||
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/packages ./packages | ||
COPY --from=builder /calcom/apps/web ./apps/web | ||
COPY --from=builder /calcom/packages/prisma/schema.prisma ./prisma/schema.prisma | ||
COPY scripts scripts | ||
|
||
EXPOSE 3000 | ||
CMD ["/calcom/scripts/start.sh"] | ||
FROM node:16 | ||
|
||
COPY scripts /opt/scripts | ||
RUN apt-get update && \ | ||
apt-get -y install netcat && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
npm install --location=global prisma && \ | ||
ln -s /opt/scripts/start.sh /opt/scripts/wait-for-it.sh /usr/bin/ | ||
|
||
EXPOSE 3000 | ||
CMD ["start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule calcom
deleted from
6b0ac9
Oops, something went wrong.