Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.47k stars 1.55k forks source link

Single Docker Image Deployment #5202

Closed shogunpurple closed 2 years ago

shogunpurple commented 2 years ago

COS

Notes

mike12345567 commented 2 years ago

Still required for full feature completion:

aderici commented 2 years ago

Thanks for initiating this. I am looking for this feature to be able to deploy my budibase into my Azure account in the form of an "appservice" because thats the simplest way to manage an app nowadays. While it supports docker-compose as a preview feature it didnt accept yours because there seems to be a limitation on how long the compose script can get.

shogunpurple commented 2 years ago

Some futher context on this - we have decided on the extent of the single image and where it will be used.

Timeline for completion on the single image is around the next 2-3 weeks, as we set up the CI pipelines and work on the tasks defined by @mike12345567 above.

aderici commented 2 years ago

Thanks @shogunpurple really happy to see a timeline for this. For Azure Appservice there are 2 requirements

1) all important data should be written into somewhere under /home folder within the docker image. Azure Appservice will only persist that folder. This is really important so that we can easily make azure persist our data for couchdb and minio. (I assume there's no need to persist redis data between restarts?)

2) its a nice convenience to be able to ssh into the docker container. In order to do that we need to install ssh and have a static (or configurable through environment variables) account set up. See the section "enable ssh" https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux

Again thanks and happy to see a timeline for single image option,

jonnymccullagh commented 2 years ago

Hi @aderici I have just merged some changes in the budibase repo to try to help you build a container image for Azure App Service. There is an associated README.md file with instructions on how to build the single image. Please let us know how you get on and if we need to make any further changes to support your usage.

aderici commented 2 years ago

@jonnymccullagh thank you so much for looking into this. I'll try this and will let you know if i run into any issues.

I followed a quite different approach and would like to share that with you as well. I have created an sh file which does docker pull for app and worker containers and copy pastes the already compiled app folders from them and then builds a single container using those folders. I went into this path because i could not compile the app on my own successfully.

I will try and use your files going forward,

Thanks again,

aderici commented 2 years ago

Hi, just seen the june release announcement that also mentions single docker on docker hub. Unfortunately it does not run as advertised on M1 mac as the oracle db module has no corresponding binaries built for arm platform. I have faced this issue when building my own single image as well, had to specifically force platform amd64. You may want to re-visit your claim of this running on arm :

image

On a side-note why is this a mandatory module i have to carry, who uses oracle anyway :) (I know some companies do)

mike12345567 commented 2 years ago

Hi @aderici - we've just pushed 1.1.3 which should resolve the issues with ARM + Oracle client lib.

https://hub.docker.com/layers/budibase/budibase/budibase/latest/images/sha256-7c7cb6cca6eb320088f74c3b8aaffac12458c4004bbb35cfdf8d0371292643b1?context=explore

aderici commented 2 years ago

Thank you! I can confirm after re-pulling the image it runs as expected on M1 Mac!

AlejandroFNadal commented 1 year ago

Hi @mike12345567 , a minor thing (tagging you because you closed this one) I have installed budibase in a raspi and I am using the single image. The budibase CLI tells me I have to go to localhost:10000 after installing, but in fact, I have to go to the port 8000. I only realized this after going inside the docker-compose.yaml.

Also, when asking for help in the terminal, it is a bit confusing I think: `

X@X:~/budi $ sudo budi hosting
Error - Unknown hosting option.
Usage: budi hosting [options]

Controls self hosting on the Budibase platform.

Options:
  --init [type]                   Configure a self hosted platform in current directory, type can be unspecified, 'quick' or 'single'.
  --start                         Start the configured platform in current directory.
  --status                        Check the status of currently running services.
  --stop                          Stop the configured platform in the current directory.
  --update                        Update the Budibase images to the latest version.
  --watch-plugin-dir [directory]  Add plugin directory watching to a Budibase install.
  --gen-user                      Create an admin user automatically as part of first start.
  --single                        Specify this with init to use the single image.
  `

So, should a person run sudo budi hosting --init single or sudo budi hosting --init --single ? Because both of them run, but one gave me a broken install and the other worked (right now I don't remember which)

I can create a bug report for these if you want, but it felt more proper to add this here.

This bug report should also be put in the budibase docs I think, because the docs just say that you have to put arm as the platform in couchdb, but that doesn't work, and the single image seems to be the simpler solution.