hiran wrote: ↑Tue Jun 06, 2023 3:11 pm
While Montana05 mentioned publishing expansions on the Expansion Manager, and the
manifest is served by
addons.oolite.space:
How does the publishing process work currently? Or, if we just serve a static file: Where is that file hosted? How can we maintain it?
Well...
I think, the original had two options:
1) PHP on the fly generated a file from the mysql database
2) The file is static and was generated when add/update any manifest via web site
How exactly - we can look at the PHP sources in the git and understand, but I don't think it's so important.
As it is now: initially, I just set up two nginx virtual hosts (my VPS), the first - addons.oolite.space and it forwards to addons.oolite.org, the second oolite.space forwards to oolite.org. These virtual hosts simply do forward requests. On the VPS, the
hosts file contains the binding of oolite.org and the IP of the original server, so nginx knows - where to forward. After one day access from my server to the original server was lost (cause unknown) - I placed the
plist file on my server, and my server began to give it a local copy - this allowed the in-game OXP manager to work, although the original site was not available. After a couple of days, access to the original server was restored (cause unknown). But since then the update file is still served by my server. I set up a
cron task to periodically update the file from the original server, so if someone updates their manifest now, the OXP manager will see this update with some time lag (no more than 15 min).
As I see the new option: on CF Worker we set up the API for editing the OXP database (CF D1/KV), after each update of the manifest, the Worker makes a "build" and push a new static file to the GitHub or stay as static on CF. The API is used by our static site hosted on GitHub. We will get an option essentially no different from what it was.
But, if we switch to the option of generating an update file on the fly, the possibilities are almost endless even without changing the in-game manager (
IMHO, I probably don't see many pitfalls yet).
For example, if add to the url (local config) of the update file just a parameter like uniq_pilot_id=18912847128474987 (which is generated when you first enter the site) - this will already allow the site to give back just what was configured and selected on the site.
IMHO the development of the OXP management functionality on the site is very promising - the browser downloads full data about the extensions, and then you can perform any manipulations with them - search, selection, mark as tracked, favorites, create your own meta-packages, etc. We can add various links to extensions: to the wiki, to the forum, to the author's page, etc. I think that viewing, selecting and creating "presets" is easier to do on the side of the website - it's easy to develop and quickly change, unlike the in-game manager.
The problem is that working with the database on the fly requires much more resources than with static - and it is likely that we can go beyond the limitations of the Free plans.
I believe that sooner or later - all free plans will disappear or be curtailed (become unusable for real cases), business is developing not for the sake of charity.
Now, for oolite.org forwarding, I bought a server in the Netherlands for about $15 per YEAR, and it's not that weak - 20GB disk, 8GB RAM... of course, having your own server, you can do anything and not build infrastructure from a bunch of free plans on different services: GitHub, CF, Supabase, HelioHost... But in this case, history may repeat itself... On the other hand, if you keep the documentation and code in the GitHub, then the loss of the server will only require the deployment of a new one - the main thing is not to lose control over the domain.
Hiran, I am ready to clarify any points if something is not clear.