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

Unify container builds for sqlite and postgres images and publish semver tags. #396

Closed
3 tasks done
onedr0p opened this issue Nov 7, 2023 · 3 comments · Fixed by #397
Closed
3 tasks done

Unify container builds for sqlite and postgres images and publish semver tags. #396

onedr0p opened this issue Nov 7, 2023 · 3 comments · Fixed by #397
Labels
enhancement New feature or request

Comments

@onedr0p
Copy link

onedr0p commented Nov 7, 2023

Clear and concise description of the problem

I am curious what is the reason for splitting these up into two separate containers and if there's any plan to unify these images into one? I am not a rust programmer so pardon me if there's a reason I cannot see. I also selfhost https://github.com/atuinsh/atuin which is also rust and has a single container that work with either postgres or sqlite.

Also, I've been using podfetch but would love it if the container tagging could adhere to semver. What I mean is that if the container tagging could be v4.3.0 instead of v4.3.0-postgres-b6d7f1b. This helps with automation tools like renovate that can scan the container registry and discover new versions.

Suggested solution

  1. Build a single container image for both sqlite and postgres
  2. Adhere container tags to semantic versioning

Alternative

Thanks for this wonderful app, there are really great design choices you have made that truely kick ass.

Additional context

Feel free to convert this into a discussion if you think that's a better way to discuss.

Validations

@onedr0p onedr0p added the enhancement New feature or request label Nov 7, 2023
@SamTV12345
Copy link
Owner

Good idea. It is unfortunately a bit complicated. Rust is statically typed so it needs to know everything at compile time. Vaultwarden solves that with an insane macro rule. Unfortunately when I was asking them for help back then I was reminded that it is a GPL project and if I take any piece of code of vaultwarden I also have to obey to the GPL license which I don't want to.

So I need to come up with my own solution but generally speaking a unified Docker image would save me so much time/complicated pipelines/headaches in general.

@onedr0p
Copy link
Author

onedr0p commented Nov 7, 2023

Good to know you're thinking about that, have you looked at how https://github.com/atuinsh/atuin has handled it? That is MIT licensed.

@SamTV12345
Copy link
Owner

I'll have a closer look tomorrow. There are two different "ORMs" in the Rust world. SQLX and Diesel. Seems like the creator of attain used SQLX and PodFetch is based on Diesel.

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

Successfully merging a pull request may close this issue.

2 participants