-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: production ready docker build with ci workflow #13541
base: main
Are you sure you want to change the base?
Conversation
chichi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Wow, thanks so much for this contribution, @ChichiCaleb. We’ve slotted it to be reviewed during the 3.9 milestone which starts the 15th. 🙏🏼 |
thanks for the great work this community has been doing |
Someone is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
If we merge this PR means that the calcom/docker repo would be deprecated? |
@ChichiCaleb We are finally coming around to deeply reviewing our Docker builds and supporting them better. Upon first review, it stands out to me that there's a lot of duplicated jobs in 3 separate files for pull_request, pull_request_target, and push_merge. Can you please explain? |
@keithwillcode just merged into a single docker-ci |
@@ -0,0 +1,6 @@ | |||
NEXT_PUBLIC_WEBAPP_URL : http://localhost:3000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these placeholders needed for?
It is needed by the replace-placeholder.sh due to next.js inline embedding of variables to avoid multiple docker image build for each environment.
SO basically the this is the best I could come up with as at the time to enable reusable single docker build |
Going to put this back into draft for now as there are a couple of things I'd like to put into this
|
its funny how everytime there is a major Update released, i ussuall come back here to check on this PR if its been merged. |
What does this PR do?
builds a production ready docker image
builds a leaner and more secure docker image (< 1/3) the size of the current calcom image
abilty to change host and any chosen inlined build time variable with runtime variable
db migration at runtime
implemented postgres healthcheck and service_healthy option in compose removing the need for wait-for-it script
ability to run unit test in docker
builds a full featured ci with ability to:
build a test image and push to GHCR which will subequently be pulled by integration-test
and trivy scan jobs for their respective actions
builds and runs unit test specified in the repo by targeting unit-test layer of multistage docker build
however uses the cache from test image to save time
pulls test image from GHCR and runs integration test in docker compose
pulls test image from GHCR and run a trivy vulnerability scan for high and crtical CVEs (non-blocking)
and uploads the sarif result to github security tab
generates changelog.MD file and create releases using conventional commits.
creates a prelease when a pull request is made to main branch following a succesful unit and integration test.
creates a release when a merge is made to the main branch and adds either the prelease or released version to github output to be used by final image published to docker hub
builds the final image and adds latest tag and
image:V*.*.*
semantic versioning tag to merge requestand
image:v*.*.*-alpha.*
tag to pull requests made to main branch before pushing to dockerhubadds the Docker image tag(s)/labels pushed to docker hub,to the pull request comment section for reference purpose
Fixes #12032
Requirement/Documentation
In repo settings under actions enable:
create a github Personal access Token and add as repo secret with the name RELEASE_MAIN for automated
changelog generation and release enabling the following:
In repo settings under rules enable:
Type of change
How should this be tested?
Duplicate
.env.example
to.env
in infra/docker/webA workflow flow run, pull request or merge request triggers the ci workflow
start the services in docker compose and test locally with:
Mandatory Tasks