mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-04-25 05:36:14 +03:00
[PR #649] [CLOSED] Feature: fully dockerized multi-stage build with 1 single Dockerfile + Github's CI/CD Pipeline #1848
Labels
No labels
AS
can't reproduce
can't reproduce
deployment
development
documentation
duplicate
duplicate
ee
enhancement
external
new driver
performance
pull-request
third party issue
wait for response
wait for review
wontfix
x:Oracle
x:cassandra
x:clickhouse
x:db2
x:duckdb
x:greenplum
x:h2
x:h2gis
x:hana
x:hive
x:intersystems
x:kyuubi
x:maria
x:mongo
x:mysql
x:postgresql
x:presto
x:sql server
x:sqlite
x:teradata
x:trino
xf:accessibility
xf:administration
xf:ai
xf:authentication
xf:aws
xf:commit-mode
xf:connection
xf:dark theme
xf:data editor
xf:datatransfer
xf:dba
xf:driver management
xf:erd
xf:filters
xf:i18n
xf:i18n
xf:installer
xf:json
xf:kerberos
xf:ldap
xf:local config
xf:log viewer
xf:metadata
xf:metadata editor
xf:navigator
xf:okta
xf:query manager
xf:resource manager
xf:scripts
xf:sql editor
xf:tasks
xf:ui/uix
xo: Firefox
xo:eclipse
xo:internet explorer
xo:macos
xp:major
xrn:internal
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloudbeaver#1848
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dbeaver/cloudbeaver/pull/649
Author: @marcellodesales
Created: 2/11/2022
Status: ❌ Closed
Base:
devel← Head:feature/dockerized-multi-stages-build📝 Commits (10+)
2540b77dbeaver/cloudbeaver#663 ♻️ 🐳 Dockerfile: ultimate multi-stage buildsc4d57a6dbeaver/cloudbeaver#663 🙈 ignoring the workspace dir when running in docker05b4d36dbeaver/cloudbeaver#663 ♻️ 🔒 run cloudbeaver with different user8a6e332dbeaver/cloudbeaver#663 ⚗️ Add the postgres example to connect to dbeaver67730dddbeaver/cloudbeaver#663 🔥 Removing shell scripts that calls deploy/docker405e117dbeaver/cloudbeaver#663 👷 🐳 Add the dockerized CI/CD pipeline: docker image4863d3bdbeaver/cloudbeaver#663 💡 Add comment docker-compose.yaml for prd volumes1cd104edbeaver/cloudbeaver#663 💚 🐳 pipeline fix: docker login before push8c4a06adbeaver/cloudbeaver#663 🚚 Rename docker-compose.yml to .yaml048c9f7dbeaver/cloudbeaver#663 ♻️ 🚚 rename the docker image before build/push📊 Changes
10 files changed (+391 additions, -27 deletions)
View changed files
➕
.github/workflows/docker-image.yaml(+219 -0)📝
.gitignore(+2 -0)➕
Dockerfile(+91 -0)➖
deploy/docker/.gitignore(+0 -1)➖
deploy/docker/Dockerfile(+0 -8)➖
deploy/docker/docker-compose.yml(+0 -10)➖
deploy/docker/make-docker-container.sh(+0 -3)➖
deploy/docker/run-docker-container.sh(+0 -5)➕
docker-compose.yaml(+57 -0)➕
samples/postgres-docker-compose.yaml(+22 -0)📄 Description
🐳 Ultimate Multi-staged Dockerized builds + Gihub's Dockerized Pipeline to Docker Hub and Github Container Registry
This commit adds initial implementation of multi-stage builds that replicates the steps from deploy/build.sh. The reason why is very simple: docker multi-stage builds are parallelized and all the stages steps are eligible for cache. This is mostly done because I want to have a very quick developer experience with DBeaver in Kubernetes and the only way to get it right is to properly have a clean and light docker image that I can run in both Kubernetes or during Services Development. That is, I don't want any Engineer in my company to have to install DBeaver as a Desktop, but use this containerized version to quickly test their services... An option that I've been using is
docker-composefor development andKubernetesfor Runtime in Production... The story is very simple: a UI engineer would not know how to setup the Database nor care about it, but with a 1-liner setup they have considered to use this setup...Goal: A singleDockerfilethat performs 3 builds, uses 4 stages, and coordinates the build in parallel: Get myself using Cloudbeaver in 1 command!🍷 Cheers!
📐 Architecture and Design
The docker build is split into 3 components:
core: dbeaver: Cloned as the git repo
the entire history. That makes the build way faster!
backend: cloudbeaver: the current project's server
frontend: web: a regular Node.js build with yard and lerna
We are providing a docker-compose as the main driver for users to properly build each individual component.
The Dockerfile was built with caches from a local build. It can be further improved if
dbeaver/cloudbeaveradds this to a pipeline (I can send a PR for that as well) and sets up the env vars with the secrets to Dockerhub.🔊 Docker build Logs
🔉 Run Logs
Just can see the logs if not putting the container in the background.
✅ Sample Testing
🔧 Setup a Database
I have added a sample using Postgres for testing... It's on the directory
samplesMaking sure that CloudBeaver is running, we can verify the containers
From the UI, we can add this database as follows:
From external, we can access them using the exposed port
🎨 Load on the declared port on docker-compose
🎨 Setup as usual
🎨 Add the Database
🎨 Test the Dockerized Database
dbandpostgres-serveras they are declared in docker-compose🎨 Login and visualizing
🎛️ Saved Configuration
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.