{"id":26793051,"url":"https://github.com/axecac/template-back-end-c-sharp","last_synced_at":"2026-05-03T15:34:46.996Z","repository":{"id":276094574,"uuid":"899509099","full_name":"AXECAC/Template-Back-End-C-Sharp","owner":"AXECAC","description":"Our template for back end on c# ","archived":false,"fork":false,"pushed_at":"2025-07-09T17:29:45.000Z","size":177,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-05T22:37:15.536Z","etag":null,"topics":["docker-compose","dotnet","postgresql","template-project"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AXECAC.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,"zenodo":null}},"created_at":"2024-12-06T12:15:03.000Z","updated_at":"2025-07-09T17:29:46.000Z","dependencies_parsed_at":"2025-03-11T16:32:46.925Z","dependency_job_id":"a7250923-2e5a-4f11-8239-ec10724a7c2b","html_url":"https://github.com/AXECAC/Template-Back-End-C-Sharp","commit_stats":null,"previous_names":["axecac/template-back-end-c-sharp"],"tags_count":3,"template":true,"template_full_name":null,"purl":"pkg:github/AXECAC/Template-Back-End-C-Sharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AXECAC%2FTemplate-Back-End-C-Sharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AXECAC%2FTemplate-Back-End-C-Sharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AXECAC%2FTemplate-Back-End-C-Sharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AXECAC%2FTemplate-Back-End-C-Sharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AXECAC","download_url":"https://codeload.github.com/AXECAC/Template-Back-End-C-Sharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AXECAC%2FTemplate-Back-End-C-Sharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32575112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","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-compose","dotnet","postgresql","template-project"],"created_at":"2025-03-29T16:18:43.207Z","updated_at":"2026-05-03T15:34:46.979Z","avatar_url":"https://github.com/AXECAC.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template-Back-End-C-Sharp\n\n## Development\n\n### Create .env file\n\n- Create file `.env` in Controllers directory\n- Add the following parameters to the file:\n    - `POSTGRES_HOST` - address of Postgres database (set to `localhost` when deploying db on your device)\n    - `POSTGRES_PORT` - port of Postgres database\n    - `POSTGRES_DB` - name of Postgres database\n    - `POSTGRES_USER` - user name for connecting to Postgres database\n    - `POSTGRES_PASSWORD` - password for connection to Postgres database\n    - `REDIS_HOST` - address of Redis database\n    - `REDIS_PORT` - port of Redis database\n    - `SECRET_KEY` - encryption key for passwords hashing\n        - Use following command to generate key:\n        ```sh\n        openssl rand -hex 32\n        ```\nExample of .env file:\n```\nPOSTGRES_HOST=localhost\nPOSTGRES_PORT=5431\nPOSTGRES_DB=templatedb\nPOSTGRES_USER=aragami\nPOSTGRES_PASSWORD=password\nREDIS_HOST=redis\nREDIS_PORT=6379\nSECRET_KEY=166eaa88fe76de61d37d56b3032b671f0150630f40f7c86d04918968246c9e01\n```\n\n### Build and run API\n\n```sh\ndotnet build Controllers/Controllers.csproj\ndotnet run --project Controllers/Controllers.csproj\n```\n\n### Deploy DBs\n\n```sh\nsudo docker-compose -f DataBase/Docker/docker-compose.yml --env-file Controllers/.env up --no-start\nsudo docker start pgadmin4Template postgresTemplate docker-redis-1\n```\n\n### Stop DBs\n\n```sh\nsudo docker stop pgadmin4Template postgresTemplate docker-redis-1\n```\n\n---\n\n## Production deploy\n\n### Create .env file\n\n- Create file `.env` in the root project's directory\n- Add all the parameters mentioned above in the “Development” point to the file, but for some, set the following values:\n    - `POSTGRES_HOST=postgresTemplate`\n    - `POSTGRES_PORT=5432`\n    - `REDIS_HOST=redis`\n    - `REDIS_PORT=6379`\n\n### Deploy all containers\n\n```sh\nsudo docker-compose up --build\n```\n\n### Stop all containers\n\n```sh\nsudo docker-compose down\n```\n\n---\n\n\n## Backup db\n\n\u003c!-- TODO: Проверить, правильно ли подтягиваются переменные окружения --\u003e\n\n```sh\nsudo docker exec postgresTemplate pg_dump -U $POSTGRES_USER -d $POSTGRES_DB \u003e backup.sql\n```\n\n## Restore db\n\n```sh\nsudo docker exec -i postgresTemplate psql -U $POSTGRES_USER -d $POSTGRES_DB \u003c backup.sql\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxecac%2Ftemplate-back-end-c-sharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxecac%2Ftemplate-back-end-c-sharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxecac%2Ftemplate-back-end-c-sharp/lists"}