Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating default site content

Featured Replies

I'm automating the process of creating a web-based applications from a template in froxlor.  I'm using the API to:

1. Create a domain
2. Create a database

Then I'm bootstrapping the database and copying a web app (php files) into the domain's directory.

Right now I'm sort of brute forcing this, by running a CLI script as root, which does all of these things -- running as root allows me to explicitly run the froxlor cron script to generate the site, and then copy the files into the domain's directory and changing ownership to the domain's customer user.

However, I'd like to try to improve on this so that I don't need to run it as root.  

Ideally Froxlor would allow me to provide a custom "site template" for when it creates the site.  Then I wouldn't need to do any post-processing outside of froxlor.  Looking through the sources it looks like it doesn't do this right now - it just has a single "standardcustomer" template that it uses for all sites.

 

Is there any recommended approach for this?  

Thanks for any pointers.

Steve

8 minutes ago, Steve Hannah said:

However, I'd like to try to improve on this so that I don't need to run it as root.  

creation of domain will always require the cron (which requires root) to generate vhost config and restart the webserver service

9 minutes ago, Steve Hannah said:

Ideally Froxlor would allow me to provide a custom "site template" for when it creates the site.  Then I wouldn't need to do any post-processing outside of froxlor.  Looking through the sources it looks like it doesn't do this right now - it just has a single "standardcustomer" template that it uses for all sites.

froxlor does not include any "autoinstaller" for webapps, so what would such "site template" include for you?

  • Author
6 minutes ago, d00p said:

creation of domain will always require the cron (which requires root) to generate vhost config and restart the webserver service

froxlor does not include any "autoinstaller" for webapps, so what would such "site template" include for you?

Being able to tell froxlor to use a different template using the Domains.add API call would be ideal.  Either a path or a URL.  Then I could generate this template before hand, place it somewhere before I make the API call to froxlor, and specify the path or URL to this template in the API call.  Then froxlor can use this template when it builds the site instead of its default template.  For the case where a URL to the template is provided (rather than a path), a ZIP/Tar file would be most practical.  For a path it wouldn't matter.  Due to security concerns in providing a path, it would probably be easiest to implement using some sort of "inbox" directory where a template could be written, then only the template name could be supplied to froxlor in the API.

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.