Public Repository

Last pushed: a year ago
Short Description
Nodejs 6.3, PostgreSQL 9.4 and PostGIS 2.1.4
Full Description

Node.js, Swagger, PostgreSQL and PostGIS

This repository contains a Dockerfile as well as a simple example that shows how you can run your own Docker container with Node.js, PostgreSQL and PostGIS.

The Docker image is using node 6.3, PostgreSQL 9.4 and PostGIS 2.1.4.

Quickstart

Using this image:

Start the Posgresql service

/etc/init.d/postgresql start

Creating a new database user

If you need any user other than the postgres user use the following command to create a new user

sudo -u postgres sh -c 'createuser newuser'

Creating a new database

sudo -u postgres sh -c 'createdb testdb'

Updating an existing database users password

sudo -u postgres psql -c "ALTER USER newuser PASSWORD 'newpassword';"

Install the PostGIS extensions on your database if needed

sudo -u postgres psql --dbname=testdb -c "CREATE EXTENSION IF NOT EXISTS postgis;"

Swagger command-line:

The swagger module provides tools for designing and building Swagger-compliant APIs entirely in Node.js. It integrates with popular Node.js servers, including Express, Hapi, Restify, and Sails, as well as any Connect-based middleware. With swagger, you can specify, build, and test your API from the very beginning, on your laptop. It allows you to change and iterate your design without rewriting the logic of your implementation.

Create a new swagger project

Learn more on the Quick Start page.

$ swagger project create hello-world

Design your API in the Swagger Editor

The interactive, browser-based Swagger Editor is built in. It provides Swagger 2.0 validation and endpoint routing, generates docs on the fly, and consumes easy-to-read YAML.

$ swagger project edit

Please see https://www.npmjs.com/package/swagger for more information.

Docker Pull Command
Owner
chillnet