The discussion is about hosting dynamic pages with Discourse. MihirR wants to create a separate folder on the same domain to host dynamic pages, such as PHP files, while keeping Discourse on the main domain. pfaffman explains that Discourse doesn’t use PHP, but plugins can achieve similar functionality. Jagster suggests using a reverse proxy or Varnish to redirect calls to a separate backend, such as LAMP, for dynamic pages.
Merefield points out that the Landing Page Plugin has a Home Pages extension that allows for dynamic pages. MihirR decides to try the plugin and later installs it, thanking merefield.
MihirR reveals that the interactive page is intended to handle API queries, mainly from Crunchbase, and asks if it’s possible to run HTML, CSS, and JS using the Landing Page Plugin. pfaffman provides resources on developing Discourse plugins. merefield advises keeping API keys secure by using a plugin, rather than the Home Pages extension, which is a front-end extension. MihirR confirms that the plugin works and is looking into keeping API keys safe using a .env file.
Is there a way to host dynamic pages with Discourse? I looked into the Landing Page Plugin, but it’s for static pages. I don’t mind having Discourse on the main domain itself instead of a subfolder, although I know I can build dynamic pages in subfolders then. Is there any alternative or a way to do this by keep Discourse in the main dir itself and adding dynamic pages to a folder?
As i red the question is can a directory, as part of an url, be outside Discourse or Docker (docker is very difficult consept to understand for me) and therefor use PHP.
Or — can, for example, a reverse proxy redirect calls so that directory part is taken care by something like LAMP, and everything else goes to Discourse. Then it is only matter of two backends, right?
Actually I’m quite sure, in theory anyway, that could be made using Varnish. What I don’t know, among really many things, what kind of conflict will happen if/when that url is called inside Discourse. Or is it even then only matter of redirects.
Not really, it’s more like a custom feature I’d like to add. It doesn’t have anything to do with Discourse, t’s more of a custom PHP page where I can fetch data using an API mostly intended from Crunchbase and make some processes work.
Also, is it possible to run HTML CSS JS here? Maybe using the landing page plugin itself or through some other method?
Yeah, if you are accessing remote data, which might require API keys, do that in a Plugin so the API keys can be kept secure and private and used only in the back-end.
Yes, that’s the reason I was actually asking if we can add a folder to keep the key safe in a .env file. Also, I tested the plugin, it works great thank you! :))