Skip to content

A docker image for Bitbucket Pipelines with node, postgres, and postgis

License

Notifications You must be signed in to change notification settings

bryanburgers/docker-node-postgres-postgis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Node/Postgres/Postgis docker image

A docker image for BitBucket Pipelines that contains node, postgres, and postgis. While (as far as I understand it) it is not good form to include so much in a single image, BitBucket Pipelines only allows using one image.

Having all three of these components in a single docker image allows me to run a full integration test of a node application against a postgresql database.

This image is available on Docker Hub at bryanburgers/node-postgres-postgis.

Starting postgres

This image does not start postgres automatically. Upon getting a bash prompt, run /start-postgres.sh to start postgres.

Example bitbucket-pipelines.yml

image: bryanburgers/node-postgres-postgis:latest

pipelines:
  default:
    - step:
        script:
          # Start the postgres server
          - /start-postgres.sh

          # Create the database schema.
          - psql -U postgres -h localhost -a -f sql/schema.sql -v ON_ERROR_STOP=1

          # Get all of the modules
          - npm install

          # And finally, run tests! This is what we actually came here for, you
          # know.
          - npm test

Node

This image inherits from node:6.9.1.

Postgres

This image uses much of the docker file from postgres:9.6.1, copy and pasted into the docker file.

Postgis

Because the application also uses Postgis, this image copy/pastes some of the docker file from mdillon/postgis:9.6.

About

A docker image for Bitbucket Pipelines with node, postgres, and postgis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages