diff --git a/.drone.yml b/.drone.yml index 016f08a..9c1cc70 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,7 @@ steps: - name: build go image: golang commands: - - go build + - go build . - name: docker image: plugins/docker diff --git a/Dockerfile b/Dockerfile index 460b83d..7ecc348 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ -FROM Alpine:latest -COPY ubnt-freifunk-map-api /bin/ubnt-freifunk-map-api +FROM alpine:latest +WORKDIR /opt/ +ADD ./ubnt-freifunk-map-api /opt/ubnt-freifunk-map-api +ADD ./devices.json /opt/devices.json +RUN chmod +x /opt/ubnt-freifunk-map-api -CMD /bin/ubnt-freifunk-map-api \ No newline at end of file +ENTRYPOINT [ "/opt/ubnt-freifunk-map-api" ] \ No newline at end of file diff --git a/example.json b/example.json index e3fca68..dff915b 100644 --- a/example.json +++ b/example.json @@ -1,9 +1,9 @@ { - "timestamp": "2020-12-31T12:19:04+0100", + "timestamp": "2021-01-01T21:16:19+0100", "nodes": [ { "firstseen": "2020-01-20T17:38:03+0000", - "lastseen": "2020-12-31T11:18:07+0000", + "lastseen": "2021-01-01T20:16:07+0000", "is_online": true, "is_gateway": false, "clients": 0, @@ -11,9 +11,9 @@ "clients_wifi5": 0, "clients_other": 0, "rootfs_usage": 0, - "loadavg": 0.26, - "memory_usage": 0.67, - "uptime": "2020-11-22T14:02:12+0000", + "loadavg": 0.02, + "memory_usage": 0.66, + "uptime": "2020-11-22T14:02:13+0000", "gateway_nexthop": "18e8292f7de6", "gateway": "a28cae6ff604", "location": { @@ -41,7 +41,7 @@ }, { "firstseen": "2020-05-05T20:08:20+0000", - "lastseen": "2020-12-31T11:18:26+0000", + "lastseen": "2021-01-01T20:15:52+0000", "is_online": true, "is_gateway": false, "clients": 0, @@ -49,9 +49,9 @@ "clients_wifi5": 0, "clients_other": 0, "rootfs_usage": 0, - "loadavg": 0.25, + "loadavg": 0.27, "memory_usage": 0.68, - "uptime": "2020-10-24T21:47:32+0000", + "uptime": "2020-10-24T21:47:33+0000", "gateway_nexthop": "18e8292f7de6", "gateway": "a28cae6ff604", "location": { @@ -83,8 +83,8 @@ "type": "wifi", "source": "18e8298ec64d", "target": "18e829dcc37e", - "source_tq": 0.345, - "target_tq": 0.345, + "source_tq": 0.315, + "target_tq": 0.315, "source_addr": "18:e8:29:8e:c6:4d", "target_addr": "18:e8:29:dc:c3:7e" }