This repository has been archived by the owner on Sep 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
杜興怡
committed
Feb 2, 2019
1 parent
85f2064
commit ea75f8f
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM golang:alpine3.8 AS builder | ||
ARG ZIPPROTOC=https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip | ||
ENV PATH=/usr/local/protoc/bin:$PATH | ||
RUN apk update && apk --no-cache add openssl-dev autoconf automake libtool git \ | ||
build-base gcc abuild binutils cmake linux-headers \ | ||
unzip curl ; \ | ||
go get -u google.golang.org/grpc ; \ | ||
go get -u github.com/golang/protobuf/protoc-gen-go ; \ | ||
curl -o protoc.zip -L $ZIPPROTOC ; \ | ||
unzip protoc.zip -d /usr/local/protoc ; | ||
WORKDIR /app | ||
RUN git clone -b heroku https://github.com/patterns/fhirbuffer ; \ | ||
cd fhirbuffer ; \ | ||
go install ./cmd/... | ||
|
||
# final stage | ||
FROM alpine:3.8 | ||
####ENV DATABASE_URL="postgres://postgres:postgres@localhost:5432/fhirbase" | ||
ENV FHIRBUFFER_COMMON=fhirbuffer3 | ||
COPY --from=builder /go/bin/server /bin/fhirbuffer | ||
RUN adduser -D fhirbuffer ; | ||
USER fhirbuffer | ||
CMD ["/bin/fhirbuffer"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# fhirbuffer | ||
|
||
fhirbuffer is a gRPC service to export data from [Fhirbase](https://health-samurai.io/fhirbase). | ||
The one thing we want it to do well is talk gRPC. | ||
So a downstream process isn't aware of the database, SQL, and ultimately even Go. | ||
|
||
For a prototype of the end-to-end flow, see [fhirping app hosted on Glitch](https://accidental-oil.glitch.me). | ||
Read the [summary blog post](https://patterns.github.io/tfx). | ||
![diagram](diagram/diagram.svg) | ||
|
||
## Quickstart | ||
|
||
1. Install Fhirbase (see their [Get Started](https://health-samurai.io/fhirbase) steps) | ||
2. Git clone repo | ||
3. Docker build | ||
|
||
``` | ||
git clone https://github.com/patterns/fhirbuffer | ||
docker build -f fhirbuffer/Dockerfile.template -t fhirbuffer fhirbuffer | ||
docker run -ti --rm -e DATABASE_URL="postgres://postgres:postgres@localhost:5432/fhirbase" fhirbuffer | ||
``` | ||
|
||
|
||
## Credits | ||
|
||
Health Samurai's | ||
[Fhirbase](https://github.com/fhirbase/fhirbase) | ||
[(LICENSE)](https://github.com/fhirbase/fhirbase/blob/master/MIT-LICENSE) | ||
|
||
gRPC | ||
[Basics for Go](https://grpc.io/docs/tutorials/basic/go.html) | ||
|
||
Jack Christensen's | ||
[PGX](https://github.com/jackc/pgx) | ||
[(LICENSE)](https://github.com/jackc/pgx/blob/master/LICENSE) | ||
|
||
Johan Brandhorst's | ||
[gRPC Client Authentication](https://jbrandhorst.com/post/grpc-auth/) | ||
[(LICENSE)](https://github.com/johanbrandhorst/grpc-auth-example/blob/master/LICENSE) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.