Skip to content
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

Docker builds? #89

Open
senpro-ingwersenk opened this issue Sep 2, 2024 · 4 comments
Open

Docker builds? #89

senpro-ingwersenk opened this issue Sep 2, 2024 · 4 comments

Comments

@senpro-ingwersenk
Copy link

Is your feature request related to a problem? Please describe.
Not relevant to a problem directly.

Basically I am mainly working with Kubernetes and it would be really helpful to run surrealdb-migrations as an initcontainer during the pod bootstrap - or during development to keep the components containerized and closer to how they will end up being deployed. For instance, I use Docker Compose during development, but rewrite the compose file into a Deployment down the line.

Describe the solution you'd like
Since Github has useful and predefined actions, I would love to see one that produces Docker container builds that simply expose surrealdb-migrations. That way, we could do docker run -it --rm .../surrealdb-migrations -v .:/src <command here> or combine it with other systems like Docker-Compose and/or Kubernetes deployments.

Describe alternatives you've considered
Publish the app to a well known package repository (Alpine, Pacman/Arch, Debian, ...) so it could be very quickly installed on-demand.

Additional context
I have a long background with MySQL and I am doing my first SurrealDB app - it's a basic SPA CRUD kinda thing - nothing fancy or complicated, but I wanted to use SurrealDB here in order to help with simplifying the frontend.

Kind regards!

@Odonno
Copy link
Owner

Odonno commented Sep 2, 2024

Hi @senpro-ingwersenk

This is an excellent idea. I published the current release and the preview releases (for alpha & beta versions of surrealdb) of surrealdb-migrations as Docker images on Docker Hub. Can you try and tell me if that's what you expected?

Here is the link: https://hub.docker.com/r/dbottiau/surrealdb-migrations

@senpro-ingwersenk
Copy link
Author

I took a look and it's awesome!

A recommendation I would give:

Set WORKDIR to a subfolder into which one may want to mount their schemas etc. This effectively turns -v ./schemas:/schemas -v ./events:/events into just -v .:/opt (or whichever folder you see fit). It just simplifies things :) Currently, CWD is /.

That said, in something like Compose or Kubernetes this is hardly an issue - but, it makes life just a little bit easier. :)

Additionally, whilst I have no real experience with those, I did see that there are dozen Github actions that allow cross-compiling and -building of container images for different architectures (aarch64/arm64, riscv64, ...). Maybe that can be implemented? My cluster at work runs on a bunch of Intel CPUs in Hyper-V - but at home, I use RockChip RK3588s, which are ARM :)

That said, I can totally work with that image for the time being, thank you!

@akkie
Copy link

akkie commented Nov 7, 2024

ARM support would be awesome.

@akkie
Copy link

akkie commented Nov 7, 2024

I added a proof of concept PR #94.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants