diff options
-rw-r--r-- | deployment/Dockerfile | 4 | ||||
-rwxr-xr-x | deployment/docker-build.sh | 3 | ||||
-rw-r--r-- | src/dkv/api/backendFilesystemConnection.go | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/deployment/Dockerfile b/deployment/Dockerfile index e9fe30d..1c1e3f6 100644 --- a/deployment/Dockerfile +++ b/deployment/Dockerfile @@ -5,7 +5,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY} ENV http_proxy $HTTP_PROXY ENV https_proxy $HTTPS_PROXY -ENV CONSUL_IP $CONSUL_IP +ENV DATASTORE_IP $DATASTORE_IP ENV CONSUL_VERSION 1.0.6 RUN apk update && \ @@ -27,12 +27,14 @@ EXPOSE 8080 RUN mkdir /dkv_mount_path && \ + mkdir /dkv_mount_path/api && \ mkdir /dkv_mount_path/consul_data && \ mkdir /dkv_mount_path/configs && \ mkdir /dkv_mount_path/configs/default WORKDIR /dkv_mount_path ADD ./dkv /dkv_mount_path/ +ADD ./token_service_map.json /dkv_mount_path/api/ ADD ./docker-entrypoint.sh /dkv_mount_path/ ENTRYPOINT /dkv_mount_path/docker-entrypoint.sh
\ No newline at end of file diff --git a/deployment/docker-build.sh b/deployment/docker-build.sh index 50a2a89..3b7e3b3 100755 --- a/deployment/docker-build.sh +++ b/deployment/docker-build.sh @@ -21,6 +21,9 @@ function generate_binary { make build popd cp ../target/dkv . + + # Change the following work around for reading token_service.json + cp ../src/dkv/api/token_service_map.json . } function build_image { diff --git a/src/dkv/api/backendFilesystemConnection.go b/src/dkv/api/backendFilesystemConnection.go index 519022c..4f2bb8e 100644 --- a/src/dkv/api/backendFilesystemConnection.go +++ b/src/dkv/api/backendFilesystemConnection.go @@ -43,6 +43,10 @@ type DirectoryStruct struct { directory string } +/* +TODO(sshank): This needs to be made completely stateless or else each container running this API will not have +same data in token_service_map.json +*/ const ( JSONPATH = "api/token_service_map.json" ) |