Thought I’d share this, here’s a way to deploy Swift applications via the Heroku Buildpack:
For a basic Vapor web app where Run
is the .executableTarget
:
app = "<APP_NAME>"
[build]
builder = "heroku/builder:22"
buildpacks = ["https://cnb-shim.herokuapp.com/v1/vapor/vapor"]
[processes]
app = "Run serve --env production --hostname 0.0.0.0 --port 8080"
[[services]]
internal_port = 8080
protocol = "tcp"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443