Snapcraft for web based tools

I have now a first working version of a Fidus Writer snap (repository) and I hope to release a stable one along with the next version of Fidus Writer in a few weeks/months.

Given that it’s a web tool, I copied a lot from the nextcloud snap. Thanks for that! I have a couple of questions though on how one is to do things:

  • It seems like Snapcraft isn’t used a lot for web tools like CMSs and alike. Nextcloud is one of few exceptions and it takes by default the port 80, it has built in an Apache server and everything needed to get lets encrypt certificates. If one runs it like that, that takes up the entire web port. For Fidus Writer I set it to port 4386 by default, thinking that the user will run it on a server together with possibly several other websites and then put all of them behind a common NGINX or Apache server which also deals with letsencrypt. Did I misunderstand how this is supposed to be used? I chose 4386 because it’s not commonly used, but maybe I should just run on port 80, include letsencrypt and assume that the user runs it all on a separate virtual machine?

  • Fidus Writer’s configuration file is quite complex and written in Python so it can include functions, etc. (Fidus Writer is Django based) . I made the configure script check whether the configuration file is working with the newly installed snap in the configure hook and I wonder what the advantage of moving configuration options to the snap internal set/get system is and what options I should move there. I had initially assume that the advantage would be that the user can then configure these options from some kind of graphical wizard, etc. . But I haven’t found any such wizards.

  • I read somewhere that there is hard time limit for the configure hook, so I am guessing that I shouldn’t do data migrations in there. What is the time limit though and can it be increased?

Thanks very much for the helpful answers I have received here so far!