GenieFramework / DockerizedGBApp

Genie 🧞‍♂️ on Docker 🐳
1 stars 1 forks source link

A little more info? #3

Open KronosTheLate opened 1 year ago

KronosTheLate commented 1 year ago

As a newcomer to docker and genie, but being very interested in quick-to-launch Genie apps, I find the readme quite lacking. Could someone provide a little more detail about what the repo contains, and how to use it?

AbhimanyuAryan commented 1 year ago

@KronosTheLate repo contains a Dockerfile which docker looks at to build an image. To build an image you use this command docker build -t gbapp:01 . to run the app inside the container you use the command docker run -p 8000:8000 gbapp:01

you can read more about docker build and docker run in docker documentation i.e. how do you pass port numbers etc

AbhimanyuAryan commented 1 year ago

besides Dockerfile other files are standard GenieBuilder files except precompile.jl which uses a package compiler to create a binary for Julia/genie app. So the genie app can have faster load times

AbhimanyuAryan commented 1 year ago

if you don't know what genie builder is: https://marketplace.visualstudio.com/items?itemName=GenieBuilder.geniebuilder

It's a vscode plugin to build no code app in genie(julia) and then you have genie cloud(that uses geniebuilder) for 1-click deployments: https://[www.geniecloud.io](https://www.geniecloud.io/)/ if you don't want to learn Docker/Kubernetes/AWS/Azure/GoogleCloude etc. It takes care of genieapps' deployment for you

KronosTheLate commented 1 year ago

Nice, thanks! I am currently working through a Genie builder tutorial, and loving it so far. I am looking to create an app that should work with as little setup as possible, as much precompiled as possible, and cross-platform. I think perhaps docker is worth looking into, but it will have to be at a later point.

So you think you could add some of this in the README? Something like """ This repo contains some files for docker, and some files for a Genie.jl app. The file Dockerfile is used to build an image, which is accomplished by 1) Opening a terminal and setting the directory to where to want the folder containing this repository. 2) Cloning this repository by git clone https://github.com/GenieFramework/DockerizedGBApp 3) Running docker build -t gbapp:01

When we run the docker build command, we use PackageCompiler to create an executable containing the full Genie.jl app, reducing the load-time of launching it. It also creates what is needed to run the app from within a so-called "dockerized" environment, which makes it more reproducible and consistent for any operating system.

After having built the image, you can then launch it by (in the same directory) running docker run -p 8000:8000 gbapp:01.

Should you run into any problems, please open up an issue. """

(These are just my best guesses on how things work, and this process is not at all verified. It is intended to show the form I am imagining, and I was hoping that you could check/write the content, and I do not know how this stuff works.)