From 27a0e199073c5f94e8c81690c7aa1f15d05b5e5a Mon Sep 17 00:00:00 2001 From: Andrea Giacobino Date: Mon, 29 Jun 2020 17:04:36 +0200 Subject: [PATCH] build: add deepsource, move to noandrea org on docker hub --- .deepsource.toml | 8 ++++++++ Makefile | 2 +- README.md | 16 ++++++++-------- 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 .deepsource.toml diff --git a/.deepsource.toml b/.deepsource.toml new file mode 100644 index 0000000..66b8288 --- /dev/null +++ b/.deepsource.toml @@ -0,0 +1,8 @@ +version = 1 + +[[analyzers]] +name = "go" +enabled = true + + [analyzers.meta] + import_paths = ["github.com/noandrea/geo2tz"] diff --git a/Makefile b/Makefile index 10c06b7..7f0aa33 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ APP=geo2tz # build output folder OUTPUTFOLDER = dist # docker image -DOCKER_REGISTRY = apeunit +DOCKER_REGISTRY = noandrea DOCKER_IMAGE = geo2tz DOCKER_TAG = $(GIT_DESCR) # build paramters diff --git a/README.md b/README.md index d6d7a34..664c733 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A self-host-able service to get the timezone given geo coordinates (lat/long) It does it by exposing the library from [github.com/evanoberholster/timezoneLookup](https://github.com/evanoberholster/timezoneLookup) -Tz data comes from [github.com/evansiroky/timezone-boundary-builder](https://github.com/evansiroky/timezone-boundary-builder) +Tz data comes from [github.com/evansiroky/timezone-boundary-builder](https://github.com/evansiroky/timezone-boundary-builder) (release [2020a](https://github.com/evansiroky/timezone-boundary-builder/releases/tag/2020a)) ## Motivations @@ -24,7 +24,7 @@ GET /tz/${LATITUDE}/${LONGITUDE} that returns a json reply (`http/200`): -```json +``` { "tz": "${TIMEZONE}", "coords": { @@ -49,7 +49,7 @@ Geo2Tz supports a basic token authorization mechanism, if the configuration valu For example running the service with: ```sh -docker run -p 2004:2004 -e GEO2TZ_WEB_AUTH_TOKEN_VALUE=secret apeunit/geo2tz +docker run -p 2004:2004 -e GEO2TZ_WEB_AUTH_TOKEN_VALUE=secret noandrea/geo2tz ``` will enable authorization: @@ -66,13 +66,13 @@ will enable authorization: ## Docker -Docker image is available at [apeunit/geo2tzt](https://hub.docker.com/repository/docker/apeunit/geo2tz) +Docker image is available at [noandrea/geo2tzt](https://hub.docker.com/repository/docker/noandrea/geo2tz) ```sh -docker run -p 2004:2004 apeunit/geo2tz +docker run -p 2004:2004 noandrea/geo2tz ``` -The image is built on scratch, the image size is ~76mb: +The image is built on [scratch](https://hub.docker.com/_/scratch), the image size is ~76mb: - ~11mb the application - ~62mb the tz data @@ -86,7 +86,7 @@ version: '3' services: geo2tz: container_name: geo2tz - image: apeunit/geo2tz:latest + image: noandrea/geo2tz:latest ports: - 2004:2004 # uncomment to enable authorization via request token @@ -130,7 +130,7 @@ spec: # value: "t" # default value #- name: GEO2TZ_WEB_LISTEN_ADDRESS # value: ":2004" # default value - image: apeunit/geo2tz:latest + image: noandrea/geo2tz:latest imagePullPolicy: Always name: geo2tz ports: