Skip to content

JewlsIOB/heroku-buildpack-freetds-rails-sqlserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

heroku-buildpack-freetds

This is a Heroku buildpack for vendoring the FreeTDS binaries into your project.

Note on Heroku config

Optionally, set the FreeTDS version in a Heroku config like this:

heroku config:set FREETDS_VERSION=1.00.21

Make sure the version you're referencing exists on as a .tar.gz file on the FreeTDS releases.

See load_env_vars in bin/compile for additional configurable variables.

At the moment, FreeTDS is downloaded and built every time since there are linking problems when caching the build artifact. The is configured by a default config of FREETDS_REBUILD=true. This default may be turned off be setting it to anything else.

heroku config:set FREETDS_REBUILD=false

How it works

Rather than pulling down binary dependencies from a package manager and extracting them into place, this buildpack compiles FreeTDS from source the first time an app is built with it. The compiled binaries are cached for future builds, so this penalty is only incurred once.

This has the downside of a (potentially very long) deploy time for the first push, with the benefit of a less-fragile build product that's somewhat less likely to break due to platform and dependency shifts. Or at least, that's the hope!

Stack compatibility

This buildpack is tested primarily against the cedar-14 stack.

Allows for usage of TinyTDS on Heroku.

Usage

This is used alongside the Ruby buildpack.

It may be useful to load any client libraries as part of the release task to ensure the libraries linked correctly. For example, in a ruby app, you may add to the Procfile: release: bin/rails r 'require "tiny_tds"'

Install

Use master

heroku buildpacks:set --index 1 https://github.com/x-b-e/heroku-buildpack-freetds

or use a stable tag, like v1.1.0

heroku buildpacks:set --index 1 https://github.com/x-b-e/heroku-buildpack-freetds#v1.1.0

Changelog

  • HEAD. Diff
  • 1.1.0 Some improvements, including logging and env var FREETDS_REBUILD. Diff
  • 1.0.0 First stable release. Diff

License

'heroku-buildpack-freetds' is distributed under the MIT license. FreeTDS http://www.freetds.org/ which is licensed under the GNU LGPL license at http://www.gnu.org/licenses/lgpl-2.0.html

About

This is a Heroku buildpack for vendoring the FreeTDS binaries into your project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%