{"id":21361861,"url":"https://github.com/mxssl/sre-test-task","last_synced_at":"2025-07-24T15:01:59.079Z","repository":{"id":96800726,"uuid":"158981268","full_name":"mxssl/sre-test-task","owner":"mxssl","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-03T13:09:54.000Z","size":187,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T19:21:28.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mxssl.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":"2018-11-24T23:13:16.000Z","updated_at":"2023-06-27T17:09:01.000Z","dependencies_parsed_at":"2023-04-05T10:01:10.914Z","dependency_job_id":null,"html_url":"https://github.com/mxssl/sre-test-task","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/mxssl%2Fsre-test-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxssl%2Fsre-test-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxssl%2Fsre-test-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxssl%2Fsre-test-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxssl","download_url":"https://codeload.github.com/mxssl/sre-test-task/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835930,"owners_count":20355611,"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":[],"created_at":"2024-11-22T06:12:17.941Z","updated_at":"2025-03-16T06:45:16.138Z","avatar_url":"https://github.com/mxssl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/mxssl/sre-test-task)](https://goreportcard.com/report/github.com/mxssl/sre-test-task)\n\n# SRE test task\n\n## Diagram\n\n[GCP diagram](https://github.com/mxssl/sre-test-task/blob/master/gcp_diagram.pdf)\n\n## Build\u0026Deploy Scripts\n\n- Docker container build [build.sh](https://github.com/mxssl/test-task/blob/master/build.sh)\n- Deploy to Kubernetes [deploy.sh](https://github.com/mxssl/test-task/blob/master/deploy.sh)\n\n## Local setup with docker-compose\n\nUse this command:\n\n```\ndocker-compose up -d\n```\n\nYou can get api via http://localhost:8080\n\n## Local dev\n\n1. Install [go](https://golang.org/dl)\n2. Install [godep](https://golang.github.io/dep)\n3. Install [golangci-lint](https://github.com/golangci/golangci-lint)\n4. Install dependencies\n\n```\nmake dep\n```\n\n5. Run linter\n\n```\nmake lint\n```\n\n6. Run db for local dev\n\n```\ndocker \\\n  run \\\n  -d \\\n  -e POSTGRES_DB=app \\\n  -e POSTGRES_USER=user \\\n  -e POSTGRES_PASSWORD=password \\\n  -p \"5432:5432\" \\\n  postgres\n```\n\n7. Declare env variables\n\n```\nexport DB_HOST=\"your_db_ip\"\nexport DB_PORT=\"your_db_port\"\nexport DB_USER=\"your_db_user\"\nexport DB_NAME=\"your_db_name\"\nexport DB_PASSWORD=\"your_db_password\"\n```\n\n8. Run tests\n\n```\nmake test\n```\n\n9. Build the app\n\n```\nmake build\n```\n\n10. Run the app\n\n```\n./app\n```\n\n11. Stop the app\n\n```\nctrl + c\n```\n\n12. Remove the binary\n\n```\nmake clean\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxssl%2Fsre-test-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxssl%2Fsre-test-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxssl%2Fsre-test-task/lists"}