{"id":18639101,"url":"https://github.com/zseta/postgres-docker-samples","last_synced_at":"2025-11-04T16:30:33.418Z","repository":{"id":203983195,"uuid":"710309975","full_name":"zseta/postgres-docker-samples","owner":"zseta","description":"PostgreSQL database samples with Docker","archived":false,"fork":false,"pushed_at":"2023-10-27T22:10:39.000Z","size":9608,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T09:29:42.360Z","etag":null,"topics":["dataset","docker","postgres","postgresql","samples"],"latest_commit_sha":null,"homepage":"https://www.attilatoth.dev/posts/postgres-docker-samples/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zseta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-26T12:49:21.000Z","updated_at":"2024-09-19T16:04:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"f93df960-d6e8-4078-8bd8-a9976a864aa2","html_url":"https://github.com/zseta/postgres-docker-samples","commit_stats":null,"previous_names":["zseta/postgres-docker-samples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fpostgres-docker-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fpostgres-docker-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fpostgres-docker-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zseta%2Fpostgres-docker-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zseta","download_url":"https://codeload.github.com/zseta/postgres-docker-samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239436476,"owners_count":19638323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataset","docker","postgres","postgresql","samples"],"created_at":"2024-11-07T05:45:03.270Z","updated_at":"2025-11-04T16:30:33.374Z","avatar_url":"https://github.com/zseta.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgreSQL database samples with Docker\nSpin up local PostgreSQL instances in seconds with preloaded sample data.\n\n## Prerequisites\n* [Docker](https://docs.docker.com/engine/install/)\n\n## Available samples\n* [movies](/movies/) ([data source](https://www.kaggle.com/datasets/tmdb/tmdb-movie-metadata))\n* [stocks](/movies/) ([data source](https://www.kaggle.com/datasets/aayushmishra1512/faang-complete-stock-data))\n\n## Get started\n1. Clone the repository:\n    ```\n    git clone https://github.com/zseta/postgres-docker-samples.git\n    ```\n\n1. Modify the `.env` file (or leave it as is):\n    ```\n    # choose a schema (must be the name of a folder)\n    SAMPLE_SCHEMA=stocks\n\n    # add database credentials\n    POSTGRES_PORT=5432\n    POSTGRES_USER=postgres\n    POSTGRES_PASSWORD=password\n    POSTGRES_DB=example\n\n    # image tag\n    DOCKER_IMAGE_TAG=sample-db\n    ```\n\n1. Build the image:\n    ```\n    chmod +x build.sh\n    ./build.sh\n    ```\n\n1. Run the container:\n    ```\n    chmod +x run.sh\n    ./run.sh\n    ``` \n\n1. Find the connection information in the `connect.txt` file for easy copy-paste:\n    ```txt\n    host=localhost\n    port=5432\n    database=example\n    user=postgres\n    password=password\n    string=postgresql://postgres:password@localhost:5432/example\n    ```\n\nTo stop the container you can press CTRL+C.\n\n## Contribute\nYou are welcome to add new sample data folders to the project. Here's how to do it:\n\nYou need to provide two types of files: data file (in CSV format) and a schema file, in the following directory structure:\n\n```bash\n├── \u003cnew_data_folder\u003e\n│   ├── data\n│   │   ├── \u003cdata_file1\u003e.csv\n│   │   └── \u003cdata_file2\u003e.csv\n│   └── schema.sql\n```\nYou can have as many CSV files in the `data` folder as you'd like. The content of each CSV file will be inserted into its corresponding table.\n\nCSV file requirements:\n* includes header\n* the name of the file must be the same as the table defined in the schema file\n* order of columns must be the same as defined in the schema file\n\nFor examples, look at any of the existing samples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzseta%2Fpostgres-docker-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzseta%2Fpostgres-docker-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzseta%2Fpostgres-docker-samples/lists"}