basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
9.66k stars 372 forks source link

Customize init command with optional arguments #658

Open hschne opened 7 months ago

hschne commented 7 months ago

When running kamal init a deploy.yml file with hard-coded values for repository, user, etc. is created. Users have to modify this file to suit their needs manually.

service: my-app # <<<

image: user/my-app # <<<

servers:
  - 192.168.0.1 # <<<

registry:
  username: my-user # <<<

Proposition

These hard-coded values could either be inferred from the environment (e.g. username, directory...) or at least be customizable in the kamal init command. For example:

kamal init --service app-name --user user-name --server 192.168.0.1

I'd be happy to work on this. What do you think?

acidtib commented 7 months ago

I like that kamal init creates a .yml file for me to manually modify to my needs, not every kamal deployment is the same, so having kamal make assumptions about my configuration would only cost me more time.

hschne commented 7 months ago

@acidtib I appreciate that! Just to clarify, I'm not advocating for replacing the deploy.yml, I'm merely proposing changing the default values with which it is created or making those default values configurable.

You'd still be able to modify those defaults - as you are now.

igor-alexandrov commented 5 months ago

I suggest implementing a post-init banner that provides information about what should be changed in deploy.yml.