bilbs84/ip-uptime

By bilbs84

Updated about 2 years ago

A small API server to check the current IP address, check for any changes, and display the uptime.

Image
Networking
API management
Monitoring & observability
0

5.1K

bilbs84/ip-uptime repository overview

A small quart based web server that monitors your IP address via icanhazip.com, then checks if it's been changed since the last check, and returns the uptime of the current IP address.

Runs on internal port 5051, just send a http request to the containers IP on that port, and it will return the current status in json format.

# curl http://loaclhost:5051
{
  "IP": {
    "address": "xxx.xxx.xx.xxx",
    "status": "No Change",
    "uptime": "4d 11h 20m "
  }
}

Docker compose...

name: sample-docker-compose
services:
    ip-uptime:
        container_name: ip-uptime
        ports:
            - 8001:5051
        volumes:
            - ~/ip-uptime:/app/ip
        restart: unless-stopped
        image: /bilbs84/ip-uptime:latest

If you map a local volume to '/app/ip' then you will have access to a text file named 'lastip' that will contain your current IP, and the time that it was last changed in UTC.

Tag summary

Content type

Image

Digest

sha256:338e418ea

Size

52.5 MB

Last updated

about 2 years ago

docker pull bilbs84/ip-uptime