NYCPlanning / labs-postgis-preview

A lightweight express app and leaflet frontend for previewing PostGIS queries
MIT License
277 stars 57 forks source link

License missing #12

Closed luiscape closed 8 years ago

luiscape commented 8 years ago

Am I wrong, or this repository doesn't have yet a license? Really interesting -- and useful!!! -- work! I'm interesting in contributing. :-)

chriswhong commented 8 years ago

What license would you recommend for a project like this? I know I should be adding licenses but I never know which one to pick.

jimmyrocks commented 8 years ago

I've been using the MIT license lately outside of work projects, which are all public domain. There's been a lot of pushback from the FOSS community on GPL.

luiscape commented 8 years ago

MIT license is certainly the most common, but depending on the project some folks will prefer Apache. GPL has a strong ideological background that makes people a bit uncomfortable (see here if interested). This may help: http://choosealicense.com/

(I would also use MIT.)

I am particularly interested in shipping this alongside a PostgreSQL + PostGIS container. The point it to improve the workflow of analysis of large geographic datasets. All licenses above would not block any of those ideas.

matt-baker commented 8 years ago

In regards to shipping along with a PostGIS container, I just added a pull request as a suggestion for running postgis-preview in Docker. It wouldn't take much to run it along with a PostGIS docker image (perhaps https://github.com/kartoza/docker-postgis?) if Docker was how you wanted to containerize it.

chriswhong commented 8 years ago

Thanks for the comments, I will add an MIT license today. I have not used docker before but would love to learn about it. The idea is that you can rapidly deploy a preconfigured VM, right?

On Thursday, May 19, 2016, Matt Baker notifications@github.com wrote:

In regards to shipping along with a PostGIS container, I just added a pull request as a suggestion for running postgis-preview in Docker. It wouldn't take much to run it along with a PostGIS docker image (perhaps https://github.com/kartoza/docker-postgis?) if Docker was how you wanted to containerize it.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/chriswhong/postgis-preview/issues/12#issuecomment-220506595

luiscape commented 8 years ago

@chriswhong sort of, but much like it. I'll build a PostgreSQL + PostGIS image that pulls from this repository and adds some sample data. Two ports will be exposed then: one for this app and one for the DB. Let's see how that goes. :)

matt-baker commented 8 years ago

@luiscape - sample data is a great idea. Would it make more sense to have two containers - one for the postgis-preview application and another for the database instance? The benefit would be that users have the flexibility to either use the bundled database or to hook it directly to their production database without having to add additional complexity and overhead to the postgis-preview repo/app.

matt-baker commented 8 years ago

@chriswhong - that is correct. Docker allows you to create a VM/container with three commands (docker build, docker create, and docker run). Several advantages of this approach are that anyone with Docker installed can use the application regardless of their OS, you can easily run multiple instances of the application (perhaps different versions of the app or pointing at different database hosts), and your development/qa/production environments all use the exact same base image/container. There are other container engines other than Docker - I'm not sure what @luiscape has in mind - he may be able to elaborate on other engines. I use Docker at work, and had the postgis-preview application containerized and running on multiple servers in < 10 minutes without having to worry about whether Node was installed etc.

The workflow for using docker is:

 # Clone the git repo
git@github.com:chriswhong/postgis-preview.git

# Build a Docker image using the Dockerfile that installs Node, opens port 3000
# and sets up the app
docker build -t='postgis-preview_image' .

# Create a container from the image
docker create --name='postgis-preview_container' postgis-preview_image

# Start the container
docker start postgis-preview_container
luiscape commented 8 years ago

@matt-baker Having two containers make sense. One would link the postgis-preview and to the PostgreSQL and have it automatically connected via environment variables. I am currently working on a project that could really use a PostGIS + the preview bundle. That is, when needed I can just explore data quickly to make sure the geographies are what I want, etc.

chriswhong commented 8 years ago

Great stuff. I'll try this out over the weekend. So is docker actually the virtualization platform itself? Or is it using some other virtualization software?

luiscape commented 8 years ago

Explaining what Docker is is an endeavor in itself. See here. It isn't a virtual machine, but one could use it that way -- for instance, by shipping a whole OS within a Docker container. But it works best as a process isolation system.

For our case, the goal is to run a PostgreSQL "process". You can build an image that uses the optimal combination of dependencies that can stretches back to the OS. That is, you can select what OS is better for running PostgreSQL, what combination of supporting software (e.g. GDAL), what file system dependencies (i.e. administrative data from somewhere), etc. Once that image is built, I can distribute it anywhere that runs Docker and the image runs exactly the same way. So the "host", in that case, can be a Linux machine running CentOS, RHEL, Debian, Ubuntu, you name it; and it all works exactly the same way.

I think there's much more to it. I think you're based in NY. If that's so, I'd love to have a drink of of these days and chat more about it.

chriswhong commented 8 years ago

@luiscape Thanks for the explanation. I am in NY so let's definitely link up soon.

chriswhong commented 8 years ago

Added MIT License