{"id":13567660,"url":"https://github.com/lus/nicegres","last_synced_at":"2026-01-03T14:02:42.713Z","repository":{"id":142950988,"uuid":"338849271","full_name":"lus/nicegres","owner":"lus","description":"A simple postgres Docker image with initial users and databases","archived":false,"fork":false,"pushed_at":"2021-06-04T10:30:44.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-01T13:38:33.767Z","etag":null,"topics":["database","docker","init","initialization","postgres","setup","user"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-02-14T16:33:19.000Z","updated_at":"2021-10-10T10:34:27.000Z","dependencies_parsed_at":"2023-04-26T16:49:22.337Z","dependency_job_id":null,"html_url":"https://github.com/lus/nicegres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fnicegres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fnicegres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fnicegres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fnicegres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lus","download_url":"https://codeload.github.com/lus/nicegres/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223083035,"owners_count":17084808,"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":["database","docker","init","initialization","postgres","setup","user"],"created_at":"2024-08-01T13:02:38.232Z","updated_at":"2026-01-03T14:02:42.635Z","avatar_url":"https://github.com/lus.png","language":"Shell","readme":"# nicegres\n\nnicegres will let you create postgres Docker containers with initial databases and users created.\nThis will allow you using the same container for many applications with different databases to not use the superuser created by default.\n\n## How does it work?\n\nSimply define the `POSTGRES_SETUPS` environment variable like this: `user:pass,user2:pass2`.\nThis will create the users **and** databases `user` and `user2` with their given passwords, every user being granted all permissions to his corresponding database.\n\nYou may also skip defining the password part to use the remaining value for the username, password and database name.\n\nIf you want a database to be created with another name than the corresponding user has, you can specify a third value: `user:pass:db`.\nThis will use `db` as the database name assigned to the user `user` with the password `pass`.\n\nAs you may have noticed above, multiple setups can be used by separating them with a comma (`,`).\n\n### Example\n\n```shell\ndocker run -d \\\n    -p 5432:5432 \\\n    --name nicegres \\\n    -e POSTGRES_PASSWORD=\"superuser_password\" \\\n    -e POSTGRES_SETUPS=\"user1:pass1:db1,user2:pass2,user3\" \\\n    ghcr.io/lus/nicegres:latest\n```\n\n**NOTE:** This feature will **not** let you bypass the requirement of a `POSTGRES_PASSWORD` variable used for the superuser!\n\n## The built image is old / Postgres got an update. What should I do?\n\nnicegres will be rebuilt every 24h. If it is mandatory to update it beforehand, build the image yourself or tell me to manually trigger it.","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flus%2Fnicegres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flus%2Fnicegres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flus%2Fnicegres/lists"}