{"id":24203367,"url":"https://github.com/fosouzadev-public/postgresql-container","last_synced_at":"2026-05-03T22:33:34.237Z","repository":{"id":262355093,"uuid":"886977067","full_name":"fosouzadev-public/postgresql-container","owner":"fosouzadev-public","description":"Estudo para criar um container do postgresql já com uma estrutura inicial.","archived":false,"fork":false,"pushed_at":"2024-11-16T01:38:57.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T14:53:13.468Z","etag":null,"topics":["docker","github-actions","github-packages","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/fosouzadev-public.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":"2024-11-12T00:29:16.000Z","updated_at":"2024-11-25T23:57:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"294d1d87-a641-4ee2-a3d7-2e10c5fb9853","html_url":"https://github.com/fosouzadev-public/postgresql-container","commit_stats":null,"previous_names":["fosouzadev/postgresql-container","fosouzadev-public/postgresql-container"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fosouzadev-public/postgresql-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosouzadev-public%2Fpostgresql-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosouzadev-public%2Fpostgresql-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosouzadev-public%2Fpostgresql-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosouzadev-public%2Fpostgresql-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fosouzadev-public","download_url":"https://codeload.github.com/fosouzadev-public/postgresql-container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fosouzadev-public%2Fpostgresql-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32587819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","github-actions","github-packages","postgresql"],"created_at":"2025-01-13T22:34:43.701Z","updated_at":"2026-05-03T22:33:34.220Z","avatar_url":"https://github.com/fosouzadev-public.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgreSQL\r\nEsse repositório permite criar um banco postgreSQL em container, já com uma estrutura e dados definidos anteriormente.\r\n\r\nPossui um fluxo no github actions que publica a imagem no github packages.\r\n[![Publish package to github packages](https://github.com/fosouzadev/postgresql-container/actions/workflows/github-images.yml/badge.svg)](https://github.com/fosouzadev/postgresql-container/actions/workflows/github-images.yml)\r\n\r\nPossui duas formas abaixo para criar o container. \r\n* Docker Compose\r\n* Docker Build\r\n\r\n## Estrutura\r\nOs arquivos da pasta `sql` serão lidos, ordenados pelo nome, e executados no banco de dados.\r\n\r\nToda a estrutura do banco e até alguns dados mais estáticos, podem ser criados apenas adicionando um novo arquivo `{número}_{nome_arquivo}.sql` no diretório `sql`. Lembre-se de nomear o arquivo seguindo a sequência numérica.\r\n\r\n## Criar container usando docker compose\r\n```\r\ndocker-compose up -d\r\n```\r\n\r\n## Criar container usando docker build\r\n```\r\ndocker build . -t postgresql-test\r\ndocker run -d --name postgresql-docker-build -p 5432:5432 -v pgdata:/var/lib/postgresql/data postgresql-test\r\n```\r\n\r\n## Criar imagem usando make\r\nNo fluxo do github actions o arquivo `makefile` é utilizado, para que após adicionar novos scripts ao repositório seja definida também a nova tag da imagem.\r\n```\r\nmake build DB_PASSWORD={senha} GITHUB_USER={usuário do github}\r\n```\r\n\r\n## Baixar imagem do Github Packages\r\n```\r\necho {token} | docker login ghcr.io -u {usuário do github} --password-stdin\r\ndocker pull ghcr.io/{usuário do github}/{imagem}:{tag}\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffosouzadev-public%2Fpostgresql-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffosouzadev-public%2Fpostgresql-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffosouzadev-public%2Fpostgresql-container/lists"}