AppImage

Is AppImage spec suitable to pack and runs multiple servers


#1

Let’s say an application consists of a database server and a custom API servers(for simplicity sake consider them as python scripts). The servers need to be started in a specific order, therefore, It seems to me that the best way to do it is through systemd.

Is it possible to have these servers/scripts packed within a single AppImage yet still have the ability to start them individually ?

I understand it doesn’t fit well with the one app = one file architecture that AppImage tries to address, but in this special scenario the app consists of three interdependent yet discrete components.

One obvious alternative is to use Ubuntu Snaps as they support definition of services. But, the disadvantage is that snaps have to be distributed through snapcraft.io. Another solution is to use docker. But the image tends to become extremely large.

AppImage places itself in a sweet spot for application distribution without needing any additional tools.

If that is not what AppImage was designed for, could anyone please point me in the right direction or suggest me to look at some existing AppImage configurations built to address this sort of architectural setup… ?

Thanks


#2

Sure, you just need to

  1. Write your start script (e.g., bash or Python) that starts the services in the correct order (called AppRun)
  2. Make sure that all processes exit when the main (frontend) application exits

In General, an AppImage is just a self-mounting filesystem that executes whatever you put inside.


#3

I played with AppImage in the meantime and it does seem to work for what I intend to achieve. Thanks a lot for making this project.

By frontend do you mean a GUI ?


#4

GUI or CLI. The “main application”.