{"id":37179697,"url":"https://github.com/adityarudrawar/go-backend","last_synced_at":"2026-01-14T20:54:29.756Z","repository":{"id":176817254,"uuid":"656556647","full_name":"adityarudrawar/go-backend","owner":"adityarudrawar","description":"Go based REST API backend template with integration with Postgres, Docker and Kubernetes. ","archived":false,"fork":false,"pushed_at":"2023-07-02T20:37:53.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-19T16:27:11.214Z","etag":null,"topics":["backend","backend-api","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/adityarudrawar.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-06-21T07:24:36.000Z","updated_at":"2023-07-12T02:26:51.000Z","dependencies_parsed_at":"2024-06-19T16:08:57.160Z","dependency_job_id":null,"html_url":"https://github.com/adityarudrawar/go-backend","commit_stats":null,"previous_names":["adityarudrawar/go-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adityarudrawar/go-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityarudrawar%2Fgo-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityarudrawar%2Fgo-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityarudrawar%2Fgo-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityarudrawar%2Fgo-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adityarudrawar","download_url":"https://codeload.github.com/adityarudrawar/go-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityarudrawar%2Fgo-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["backend","backend-api","go","golang"],"created_at":"2026-01-14T20:54:29.017Z","updated_at":"2026-01-14T20:54:29.744Z","avatar_url":"https://github.com/adityarudrawar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a template that I developed for REST API backend with Go programming language and postgres database.\nThis has support for custom postgres images that you can create and preload data in to that image, plus already written kubernetes files.\n\nYou can directly fork this and update according to your needs.\n\nI am constantly learning and will be improving the code base even more.\n\n## Technologies and libraries\n1. [Go](https://go.dev/)\n2. [Postgres](https://www.postgresql.org/)\n3. [Gofiber](https://gofiber.io/)\n4. [ORM](https://gorm.io/)\n5. [Docker](https://www.docker.com/)\n\n## Building and running the application\n\nYou can directly run the kubernetes files or the docker containers by the commands below, you can also build the custom image stated below.\n\n### A. Create Custom postgres docker image\nModify the database/init.sql according to your needs to create your databases, tables, relations, and load data.\nDuring the building phase the Docker image will be builded by running the script inside the container to create the custom postgres image.\n\nCommand to build the postgres docker image\n```\ndocker image build -f db.Dockerfile -t metalman66/postgresdb:latest .\n```\n\nPush the postgres docker image to docker hub\n```\ndocker push metalman66/postgresdb\n```\n\nIf you want to run the docker image locally, run the following command\n```\ndocker container run -d --rm -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres --name postgresdb metalman66/postgresdb:latest\n```\n\n### B. Docker Compose\n\nYou can run the application throught docker by using the docker-compose file.\nCommand to run docker-compose.\n\n```\ndocker-compose up --build\n```\n\n### C. Kubernetes\nYou can run the application through deployment on a kubernetes cluster. \nYaml files are present for the gobackend and the postgres db.\n\nRun the following command to start the Kubernetes deployment and services.\n```\nkubectl apply -f postgresdb.yaml\nkubectl apply -f gobackend.yaml\n```\n\n### Future Tasks\n1. Add tests \n2. Add support for gRPC\n3. Add support for GraphQL database \n4. Add support for Auto build and push to dockerhub through Github actions\n\n#### Useful links\n1. https://cadu.dev/creating-a-docker-image-with-database-preloaded/\n2. https://stackoverflow.com/questions/53735948/cannot-get-connection-between-containers","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityarudrawar%2Fgo-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadityarudrawar%2Fgo-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityarudrawar%2Fgo-backend/lists"}