{"id":20418934,"url":"https://github.com/safe-stack/safe-buildpack","last_synced_at":"2025-04-12T17:40:30.192Z","repository":{"id":72451293,"uuid":"183419874","full_name":"SAFE-Stack/SAFE-buildpack","owner":"SAFE-Stack","description":"Heroku buildpack for SAFE","archived":false,"fork":false,"pushed_at":"2019-12-19T14:55:21.000Z","size":104,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T12:01:42.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/SAFE-Stack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-04-25T11:23:12.000Z","updated_at":"2022-01-25T03:11:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfaa9dcb-2119-4b99-92d7-1a16d005a888","html_url":"https://github.com/SAFE-Stack/SAFE-buildpack","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/SAFE-Stack%2FSAFE-buildpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAFE-Stack%2FSAFE-buildpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAFE-Stack%2FSAFE-buildpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAFE-Stack%2FSAFE-buildpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAFE-Stack","download_url":"https://codeload.github.com/SAFE-Stack/SAFE-buildpack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248607371,"owners_count":21132517,"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-15T06:35:22.396Z","updated_at":"2025-04-12T17:40:30.180Z","avatar_url":"https://github.com/SAFE-Stack.png","language":"Shell","funding_links":["https://www.paypal.me/jincod/5"],"categories":[],"sub_categories":[],"readme":"# Heroku .NET Core Buildpack\n\n\nThis is the [Heroku buildpack](https://devcenter.heroku.com/articles/buildpacks) for [ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/).\n\n[![Build status](https://ci.appveyor.com/api/projects/status/5864d533m5d35nsa?svg=true)](https://ci.appveyor.com/project/jincod/dotnetcore-buildpack)\n\n## Usage\n\nThe Buildpack will search through the repository's folders to locate a `Startup.cs` or `Program.cs` file. If found, the `.csproj` in the containing folder will be used in the `dotnet publish \u003cproject\u003e.csproj` command.\n\nIf repository contains **multiple** Web Applications (multiple `Startup.cs`), `PROJECT_FILE` and `PROJECT_NAME` environment variables allow to choose project for publishing.\n\n### .NET Core latest stable\n\n```\nheroku buildpacks:set jincod/dotnetcore\n```\n\n### .NET Core edge\n\n```\nheroku buildpacks:set https://github.com/jincod/dotnetcore-buildpack\n```\n\n### Previous releases\n\n```\nheroku buildpacks:set https://github.com/jincod/dotnetcore-buildpack#version\n```\n\nAvailable [releases](https://github.com/jincod/dotnetcore-buildpack/releases)\n\nMore info\n\n- [Heroku Buildpack Registry](https://devcenter.heroku.com/articles/buildpack-registry)\n- [Buildpack references](https://devcenter.heroku.com/articles/buildpacks#buildpack-references)\n\n## Entity Framework Core Migrations\n\nYou cannot run migrations with the `dotnet ef` commands once the app is built. Alternatives include:\n\n### Enabling Automatic Migrations\n\n- Ensure the `ASPNETCORE_ENVIRONMENT` environment variable is set to `Production`. ASP.NET Core scaffolding tools may create files that explicitly set it to `Development`. Heroku config will override this (`heroku config:set ASPNETCORE_ENVIRONMENT=Production`).\n- Configure your app to automatically run migrations at startup by adding the following to the `.csproj` file:\n\n```xml\n\u003cTarget Name=\"PrePublishTarget\" AfterTargets=\"Publish\"\u003e\n  \u003cExec Command=\"dotnet ef database update\" /\u003e\n\u003c/Target\u003e\n```\n\n- Configure your connection string string appropriately, for example, for PostgreSQL:\n\n`sslmode=Prefer;Trust Server Certificate=true`\n\n### Manually Running Migration Scripts on the Database\n\n- Manually run SQL scripts generated by Entity Framework Core in your app's database. For example, use PG Admin to connect your Heroku Postgres service.\n\n## Node.js and NPM\n\n```bash\nheroku buildpacks:set jincod/dotnetcore\nheroku buildpacks:add --index 1 heroku/nodejs\n```\n\n[Using Multiple Buildpacks for an App](https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app)\n\n## Example\n\n[ASP.NET Core Demo App](https://github.com/jincod/AspNet5DemoApp)\n\n## Donation\n\nIf this project help you, you can give me a cup of coffee ☕\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/jincod/5)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-stack%2Fsafe-buildpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafe-stack%2Fsafe-buildpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-stack%2Fsafe-buildpack/lists"}