thealmarques / postgresql-docker-seed-data

PostgreSQL - Run automated container with seed data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postgres - Automated container with seed data file

This project is a very simple example of how you can execute an image of Postgres with an initial set of data.

How

Steps

This project can be divided into three different moments.

  • Dockerfile - Containing the image construction where we feed the entry point with sql scripts.
  • Script execution - This scripts will execute when the container is started.
  • Docker compose file - File used to define services to execute (in this case we'll only have a Postgres service from the previous Dockerfile)

Usage

Run the following command to start the service

docker-compose up --build -d

Now you can use any database admin tool to see the data created on the database.

Configurations:

  • Host:Port = localhost:15432
  • Database_name = mydb
  • User/password = admin/admin

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

PostgreSQL - Run automated container with seed data


Languages

Language:Dockerfile 100.0%