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

custom commands #4

Closed
Tobi-De opened this issue Oct 25, 2024 · 2 comments
Closed

custom commands #4

Tobi-De opened this issue Oct 25, 2024 · 2 comments

Comments

@Tobi-De
Copy link
Member

Tobi-De commented Oct 25, 2024

custom cappa modules that can be dynamically imported and added to the cli

@Tobi-De
Copy link
Member Author

Tobi-De commented Oct 27, 2024

Ok, some back and forth with Cofin got me thinking. The main reason I'm not using Docker (except for the fact that Kamal exists) is for simplicity; adding Docker to the mix would be one more tool to learn to get the app into production. Plus, I already have a nice, quite simple, and straightforward way to deploy my app with Docker and CapRover. I've gotten quite comfortable with Docker, so basing Fujin on it wouldn’t bring much added value for me. Like with Falco, the goal is to empower individuals (I've been vibing with recent Ruby on Rails talks), meaning most of the tools I'm building are geared toward a single individual building stuff (the main target audience being me). Even at work, I'm often on a one-man team.

With all that said, there is still an issue Fujin doesn’t fix: PostgreSQL + point-in-time backup without using a managed service. I narrowed down the focus to packaging Python apps so that the workflow is more reliable and simple, but I'm having a hard time figuring out how to make this work for additional services like PostgreSQL, or any others I might need—PostgreSQL is just the main one for now.

fujin pg install
fujin pg createdb

Cofin recommended this https://github.com/vitabaks/postgresql_cluster, which is really cool and could be very useful at work, but for a single person working on a prototype, that’s probably too much. He also recommended Podman and this.

Now, here’s what I’m thinking: adding a new key extensions (better than custom commands) with a list of modules that can be imported and added. This reminded me of DJP and its plugin system based on Pluggy. The first one I'll go with is an extension based on Podman to set up and install services.

This extension will be added in a list in the fujin.toml file as extensions = ["fujin-services"], and it will have its own config service with the ability to declare Docker/Podman services. One thing I’m thinking is that if I flesh out the hook system correctly and maybe add a top-level skip_project_install, the extension could be used to deploy the project itself by extending the hooks and processes lists. Since systemd can manage Podman containers, it might come with its own custom process manager to replace the default, managing both a normal project or a container-based project.
This approach would let me keep containers out of the picture until I need postgres.

@Tobi-De
Copy link
Member Author

Tobi-De commented Nov 2, 2024

nah, will just do this #17 instead

@Tobi-De Tobi-De closed this as completed Nov 2, 2024
@Tobi-De Tobi-De closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2024
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

1 participant