visibilityspots / dockerfile-domain-watcher

check if a given domain became available

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DomainWatcher

trivy docker-hub-description build status gitHub release docker image size docker pulls license

a docker container which checks if a given domain is still available and sends a message through gotify using gotify-cli

configuration

fetch your gotify token from the config file created by gotify initialization which you could perform on your local machine or from within a docker container.

cat cli.json
{
  "token": "BAR",
  "url": "FOO",
  "defaultPriority": 0
}

run

$ docker run --rm -e GOTIFY_URL=FOO -e GOTIFY_TOKEN=BAR visibilityspots/domain-watcher:latest visibilityspots.org

build

$ docker build -t visibilityspots/domain-watcher:dev .

test

I wrote some tests in a goss.yaml file which can be executed by dgoss

$ dgoss run -e GOTIFY_URL=FOO -e GOTIFY_TOKEN=BAR visibilityspots/domain-watcher:dev visibilityspots.org
INFO: Starting docker container
INFO: Container ID: 61bd26b7
INFO: Sleeping for 0.2
INFO: Container health
INFO: Running Tests
Command: domain-watcher: exit-status: matches expectation: [0]
Command: whois visibilityspots.org: exit-status: matches expectation: [0]


Total Duration: 1.020s
Count: 2, Failed: 0, Skipped: 0
INFO: Deleting container

act

using act for local testing of the written github actions makes my life and commit history a lot easier;

$ act -l
Stage  Job ID  Job name  Workflow name           Workflow file               Events
0      update  update    docker-hub-description  docker-hub-description.yml  push
0      test    test      CI                      main.yaml                   push
0      scan    scan      trivy                   trivy.yml                   push,pull_request,schedule
1      deploy  deploy    CI                      main.yaml                   push

$ act -j test
[CI/test] πŸš€  Start image=catthehacker/ubuntu:act-latest
.
.
.
[CI/test]   βœ…  Success - Main Execute Goss tests
[CI/test] 🏁  Job succeeded

License

Distributed under the MIT license

About

check if a given domain became available

License:MIT License


Languages

Language:HCL 51.3%Language:Shell 41.7%Language:Dockerfile 7.0%