swiftwave-org / swiftwave

Self-hosted lightweight PaaS solution to deploy and manage your applications on any VPS [Your own self-hosted Heroku, Vercel]
https://swiftwave.org
Apache License 2.0
379 stars 31 forks source link

feat: support to add configurable action btns for one-click apps #574

Open tanmoysrt opened 4 months ago

tanmoysrt commented 4 months ago

Is your feature request related to a problem? Please describe

Usually for any kind of app, if we need to execute some operations like backup, restore, other options, we will attach to docker container and run some commands. In fewer cases, we also need to refer service configuration in database (like postgresql DSN)

Describe the solution you'd like

We need to extend the docs of stack, where we can provide this custom action buttons. Specs will be like

  1. Button Name
  2. Required Inputs
    • Name of Input
    • Description
    • Type of Input (Text, Number, Dropdown)
  3. Output
    • Title
    • Description
    • Type (Text, File [Temporary, will be destroyed after download])
  4. Message
    • Success Message
    • Error Message
    • Warning before executing Message
  5. Command
    • Type (Exec, Text Interpolation)
    • Command / Text Format
    • It can have specific syntax and will be replaced by swiftwave before executing, like $env.<variable_name>

Note: If in any case, we need to store thing in file, using exec store in a temp directory and later use docker cp to copy from container to host and then from host using rsync, move to swiftwave node

Are you working on this?

Yes

tanmoysrt commented 3 months ago

Delaying as user can still open terminal and do any operation.

tanmoysrt commented 3 months ago

API docs to copy file from container - https://docs.docker.com/engine/api/v1.44/#tag/Container/operation/ContainerArchive

tanmoysrt commented 3 months ago

Let's go ahead without this for v2 first release. People can use the web shell to run something (manual) Current target is to make swiftwave stable and provide different config of apps (with sqlite / with mysql / with external mysql)