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

Updating/pulling containers on NixOS module deployment. #210

Open
tsk547 opened this issue Aug 22, 2023 · 3 comments
Open

Updating/pulling containers on NixOS module deployment. #210

tsk547 opened this issue Aug 22, 2023 · 3 comments

Comments

@tsk547
Copy link

tsk547 commented Aug 22, 2023

I've recently migrated my home server to NixOS and decided to use arion for my container management because it made it easy to convert my docker-compose files into something I could use declaratively in my configuration.nix. I'm using arion as a NixOS. I have a file for each container (or multiple containers if I need a database container for that service), that get imported into virtualisation.arion.projects.

What would the proper way be to update/pull those containers? I can't use the arion command because it expects an arion-pkgs.nix and arion-compose.nix, which I'm not using. Is it best to just pull the containers individually with docker pull and then restart the arion-<container_name>.service?

Also, is there a way to have arion just pull the containers when the service starts/restarts? That would actually be ideal for me.

@roberth
Copy link
Member

roberth commented Aug 22, 2023

I don't really use it that way, but I guess it would be nice to have an option that does such things.
Here's where the NixOS service performs arion up. We could add to that.

arion --prebuilt-file "$ARION_PREBUILT" up

@tsk547
Copy link
Author

tsk547 commented Aug 22, 2023

What about maybe implementing pull_policy as an arion option? https://github.com/compose-spec/compose-spec/blob/master/spec.md#pull_policy

It's a feature already built into docker-compose and it would let you define it on a container by container bases.

@Noodlez1232
Copy link

I want to implement this, but I have a bit of a question. I'm not sure if I can just simply plop the option here and if it'll just simply get propagated through to the docker-compose file

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