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.
This image does not start postgres automatically. Upon getting a bash prompt,
run /start-postgres.sh
to start postgres.
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
This image inherits from node:6.9.1.
This image uses much of the docker file from postgres:9.6.1, copy and pasted into the docker file.
Because the application also uses Postgis, this image copy/pastes some of the docker file from mdillon/postgis:9.6.