Build Docker Image
In this tutorial we will set up the chinhook sample database in a docker container. To follow along with this tutorial you will need to have Docker installed, Git and some way to access the database.
The first step will be to build the docker image we will be using to stand up Postgres. To begin clone the repo https://github.com/monstarillo/monstarillo-templates. Open a command prompt and cd to the chinhook-db folder in the reop you just cloned. Create the docker image for our database with the command:
docker build -t monstarillo-postgres .

This image includes the Postgres database and scripts to seed it with the Chinhook database schema and data. Create the container by running the following command replacing <Your Password> with the password of your choice:
docker run --name monstarillo-postgres -e POSTGRES_PASSWORD=<Your Password> -p 5432:5432 -d monstarillo-postgres
The JDBC URL for your database will be
jdbc:postgresql://localhost:5432/postgres
The default username is postgres and the default schema is public. The postgres user’s password will be the password you used in the docker run command above.
You have now set up the chinhook sample database in a docker container and logged in to test it.
Next you can try to Generate a Rest API Using Go For a Postgres Database or Generate a REST API Using Java for a Postgres database.
[…] A Postgres database – I will be using the chinhook database. Set up the Chinhook Sample Postgres Database in Docker […]
[…] A Postgres database – I will be using the chinhook database. Set up the Chinhook Sample Postgres Database in Docker […]
[…] this tutorial I will create a simple sequelize model for the Postgres sample chinhook database using sequelize-auto. After creating the model I will write some Javascript code to export […]
[…] In this post I will demonstrate how to create Monstarillo templates that generates code you like. I will show you how I take existing working code, a RESTFUL API using Node.js Express and Sequelize against a Postgres database and create monstarillo templates that will work against any sequelize model.. The code for this simple API can be found at https://github.com/mrpatrickwright/simple-node-sequelize-api. The API runs against the Chinhook sample database. You can learn how to stand it up in docker here […]