{"id":13903030,"url":"https://github.com/kylef/heroku-buildpack-swift","last_synced_at":"2025-07-18T00:33:00.828Z","repository":{"id":71328196,"uuid":"47416861","full_name":"kylef/heroku-buildpack-swift","owner":"kylef","description":"Heroku build pack for Swift","archived":true,"fork":true,"pushed_at":"2021-10-24T21:10:38.000Z","size":37,"stargazers_count":508,"open_issues_count":5,"forks_count":0,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-25T11:39:56.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cloudfoundry-community/swift-buildpack","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylef.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}},"created_at":"2015-12-04T16:49:32.000Z","updated_at":"2023-11-14T17:59:27.000Z","dependencies_parsed_at":"2023-02-27T10:16:09.047Z","dependency_job_id":null,"html_url":"https://github.com/kylef/heroku-buildpack-swift","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kylef/heroku-buildpack-swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Fheroku-buildpack-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Fheroku-buildpack-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Fheroku-buildpack-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Fheroku-buildpack-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylef","download_url":"https://codeload.github.com/kylef/heroku-buildpack-swift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Fheroku-buildpack-swift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265685524,"owners_count":23811191,"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-08-06T22:01:34.346Z","updated_at":"2025-07-18T00:33:00.561Z","avatar_url":"https://github.com/kylef.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Heroku buildpack: swift\n\nThis buildpack is not recommended for use. Instead consider using [Heroku's container runtime](https://devcenter.heroku.com/articles/container-registry-and-runtime) along with the [Swift container images](https://swift.org/download/).\n\nFor example a Dockerfile:\n\n```dockerfile\nFROM docker.io/swift:5.5 as build\n\nWORKDIR /usr/src/app\n\nCOPY Package.swift Package.resolved ./\nCOPY Sources Sources\nCOPY Tests Tests\nRUN swift build --configuration release\nRUN swift test --configuration release\n\n\nFROM docker.io/swift:5.5-slim\n\n# Copy the build executable target (named in Package.swift)\nCOPY --from=build /usr/src/app/.build/release/server .\nCMD ./server $PORT\n```\n\nBuild and push the image to Heroku's registry:\n\n```shell\n$ heroku container:push web\n```\n\nThen release the image:\n\n```shell\n$ heroku container:release web\n```\n\n## Buildpack Usage\n\nFor historical purposes, below are the usage for the buildpack. Although its use is discouraged.\n\nExample usage:\n\n```shell\n$ ls\nProcfile Package.swift Sources\n\n$ heroku create --buildpack kyle/swift\n\n$ git push heroku master\nremote: -----\u003e Swift app detected\nremote: -----\u003e Installing Swift 4.1\nremote: -----\u003e Installing clang-3.7.0\nremote: -----\u003e Building Package\nremote: -----\u003e Copying binaries to 'bin'\n```\n\nYou can also add it to upcoming builds of an existing application:\n\n```shell\n$ heroku buildpacks:set kyle/swift\n```\n\nThe buildpack will detect your app as Swift if it has a `Package.swift` file in\nthe root.\n\n### Procfile\n\nUsing the Procfile, you can set the process to run for your web server. Any\nbinaries built from your Swift source using swift package manager will\nbe placed in your $PATH.\n\n```swift\nweb: HelloWorld --workers 3 --bind 0.0.0.0:$PORT\n```\n\n### Specify a Swift version\n\nYou can also customise the version of Swift used with a `.swift-version` file\nin your repository:\n\n```shell\n$ cat .swift-version\n4.1\n```\n\nThe `.swift-version` file is completely compatible with\n[swiftenv](http://github.com/kylef/swiftenv).\n\n**NOTE**: *Since there are frequent Swift language changes, it's advised that\nyou pin to your Swift version.*\n\n### Hooks\n\nYou can place custom scripts to be ran before and after compiling your Swift\nsource code inside the following files in your repository:\n\n- `bin/pre_compile`\n- `bin/post_compile`\n\nThis is useful if you would need to install any other dependencies.\n\n### Using the latest buildpack code\n\nThe `kyle/swift` buildpack from the [Heroku Registry](https://devcenter.heroku.com/articles/buildpack-registry) represents the latest stable version of the buildpack. If you'd like to use the latest buildpack code from this Github repository, you can set your buildpack to the GitHub URL:\n\n```shell\n$ heroku buildpacks:set https://github.com/kylef/heroku-buildpack-swift\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylef%2Fheroku-buildpack-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylef%2Fheroku-buildpack-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylef%2Fheroku-buildpack-swift/lists"}