Public Repository

Last pushed: 15 days ago
Short Description
Caliber Technology TaxQuery server
Full Description

A service which determines tax jurisdiction names for U.S. payroll employees, based on workplace and resident addresses. Tax names correspond to those used by https://hub.docker.com/r/calibertechnology/taxserver-demo as well as TaxControls components found at https://www.taxupdate.com.

Starting with tag 2018-02-07v, this image contains US Census ADDR, EDGES, and FEATNAMES data and no longer queries the Google Maps API.

To try it out:

docker run -p 8443:8443 calibertechnology/taxquery

Then point your browser to https://localhost:8443 for an API description. Note that the TLS certificate is self-signed, so you will get a browser warning about the encryption.

Dockerfile:

FROM ruby:2.3-alpine

RUN apk update && apk upgrade
RUN apk add --update gcc make sqlite sqlite-dev unzip git bash wget libc-dev openssl-dev
RUN gem install text fastercsv sinatra haml openssl heist --no-rdoc --no-ri
RUN git clone https://github.com/geocommons/geocoder.git
RUN git clone git://github.com/luislavena/sqlite3-ruby.git

WORKDIR /sqlite3-ruby
RUN ruby setup.rb all

WORKDIR /geocoder
RUN sed -i -e 's/__va_copy/va_copy/' src/liblwgeom/vsprintf.c
RUN make
RUN sed -i -e 's/::Config::CONFIG/::RbConfig::CONFIG/' setup.rb
RUN ruby setup.rb all

RUN mkdir -p /opt/tiger
COPY data/tl* /opt/tiger/
RUN sed -i -e 's/SHP2SQLITE=.*/SHP2SQLITE=\/geocoder\/src\/shp2sqlite\/shp2sqlite/' build/tiger_import
RUN build/tiger_import /opt/tiger/geocoder.db /opt/tiger

RUN chmod +x /geocoder/bin/rebuild_metaphones
RUN /geocoder/bin/rebuild_metaphones /opt/tiger/geocoder.db

RUN chmod +x /geocoder/build/build_indexes
RUN build/build_indexes /opt/tiger/geocoder.db

RUN chmod +x /geocoder/build/rebuild_cluster
RUN build/rebuild_cluster /opt/tiger/geocoder.db

WORKDIR /opt/tiger
RUN rm tl*

COPY index.rb fips.rb sinatra_ssl.rb taxes.rb taxes.db library.scm /geocoder/
COPY certs /geocoder/certs/

EXPOSE 8443
WORKDIR /geocoder
CMD ruby index.rb
Docker Pull Command
Owner
calibertechnology