hackgvl / open-map-data-multi-layers-demo

A bookmarkable map displaying all layers from HackGreenville Labs' Open Map Data
https://hackgvl.github.io/open-map-data-multi-layers-demo/
MIT License
2 stars 2 forks source link

Host the Demo Map on a Domain Outside of the Current GitHub Pages #9

Open allella opened 1 year ago

allella commented 1 year ago

Since the rebranding to HG Labs, we lost use of the previous CFG domain for Olivia's version of the demo map.

The current GitHub page URL for the demo map is https://hackgvl.github.io/open-map-data-multi-layers-demo/ , but it would be nice to have that under data.openupstate.org, or some other domain or subdomain that's not a GitHub domain.

ThorntonMatthewD commented 11 months ago

Would something like https://map.opendata.org work?

GitHub Pages only supports sub and apex domains. It seems like a subdomain would be the easiest route here.

https://github.com/hackgvl/open-map-data-multi-layers-demo/settings/pages <-- There should be an option to specify the address here on the GHub side (alternatively we could just add a CNAME file manually), and then it'd be a matter of setting a CNAME record in the settings for the domain itself.

GitHub Pages - Configuring a subdomain

Question: If the CNAME file is present in the repo, is the existing address still active? It seems like it will be. Answer: Yes. See https://ysoftwareab.github.io (CNAME file) and https://ysoftware.se/ This should allow for immediate implementation without risking breaking links.

Question: Where would there need to be updates to hrefs to point to the new domain across the HGVL portfolio? Answer:

allella commented 11 months ago

We have used https://data.openupstate.org/map-layers to preview the layers for years. It's sort of a hybrid view for developers and random people who find maps through search engines.

We've never widely publicized the map layers because some of them may not be very well maintained. Plus, I'm not sure if the Greenville County iMAP layers are still being updated by the iMAP project team.

The previous version of the demo map was hosted at https://data.openupstate.org/map/preview/all-layers/dist/#/ and an old copy is still there.

We could continue with the demo map under https://data.openupstate.org or possibly another subdomain of openupstate.org

I'm not sure if HackGreenville is the best domain for it since many of the layers, like the Greenville County GIS ones, are pretty random services.

This demo map hasn't been widely promoted, so we don't have to worry much about changing the URL as far as I'm concerned.

Is hosting this on GitHub pages going to lead to limitations? Would we be better off doing like with the Slack Bot and having GitHub build a container and then Docker deploy releases in a directory of https://data.openupstate.org ?

ThorntonMatthewD commented 11 months ago

I think keeping with GitHub pages will box us in as far as our possible paths forwards, for sure.

The newer implementation of the demo map is bundled into static files for deployment-- this would bypass the need for Docker (unless it is part of the build pipeline) to be configured for this app. I think the question will become how to get the updated bundled files onto the VPS from the continuous delivery flow. In the past I've placed an SSH to my VPS into GitHub secerts and had GitHub actions use scp to put the files on the machine. Also in the workflow I would typically use this action to execute commands on the VPS to move files into place. That's just one way of many that it could be gone about.

allella commented 11 months ago

I think the last time the SSH appleboy conversation came up the conversation with the broader HackGreenville community may have suggested considering a pull / monitoring tool on the server end as an alternative to an SSH push from GitHub.

Drone and Argo were mentioned, though they may be more enterprise level.

ThorntonMatthewD commented 11 months ago

Got it! I wonder if starting off with a script on a cron schedule to check for, and download, tagged releases from the repo could be a good fit. There could be a workflow bundles the app, creates a release, and then uploads the files in a .zip to the releases as an artifact that the script can occassionally query for and pull if it finds a newer release.

I don't have much personal experience with pull-based deployments, so I'll be researching the landscape in the meantime to familiarize myself with the landscape. Both Argo and Drone look very compelling! For Argo especially- has there been any desire to run these apps on a k8s cluster (even if it's a single node)?

allella commented 11 months ago

I don't know much about k8s or the other tools, but they mostly seem like more overhead and moving parts than we'd want for these small projects.

We'll figure out more as we join up with RefactorGVL and understand the hosting budget, but no / low cost and non-enterprise are probably things we'll continue doing with these community projects.

oliviasculley commented 11 months ago

I self-host drone, and it's more of an alternative to a CI system like github actions. We can talk more about this later, but I think for other applications deployments it'd make sense to use any of the heroku alternatives such as fly, vercel, etc.

For this application, I think the best solution would be to continue using Github pages since the application is a static page and Github pages is currently free. I host https://olivia.sculley.dev from Github pages, so there's a reference example of using Github pages with a custom domain/subdomain.

If this map progresses past the need for a static site, we could look into using some of those other hosting options, but it seems unnecessary at the current moment.

ThorntonMatthewD commented 11 months ago

Drone looks great! I've just ordered a new SSD for my home server (my old boot drive somehow got fried) and I'd love to take it for a spin also once it arrives. It looks like it could be a good fit for where things currently stand. :grin:

ThorntonMatthewD commented 11 months ago

I didn't realize there was a difference between user/org and project pages. 😲 Something like https://data.opendata.org/open-map-data-multi-layers-demo seems to be possible.

For example, if the custom domain for your user site is www.octocat.com, and you have a project site with no custom domain configured that is published from a repository called octo-project, the GitHub Pages site for that repository will be available at www.octocat.com/octo-project.

Source

I apologize for any confusion I may have brought about.