Giter VIP home page Giter VIP logo

hamclock-docker's Introduction

Hamclock Docker

"HamClock is a kiosk-style application that provides real time space weather, radio propagation models, operating events and other information particularly useful to the radio amateur." (Source: Hamclock Website)

Goal of this repository is to build and run Hamclock inside Docker for ease of use. Hamclock will be exposed as a webservice on http://localhost:8081/live.html

This repository does NOT contain any Hamclock source files as it's neither neccessary nor is the licensing clear. The files will be downloaded and compiled during docker build.

More information and documentation on the Hamclock Website: https://www.clearskyinstitute.com/ham/HamClock/

How to use

Prerequisites

I assume that you're on some form of Linux/Unix system. Docker and (optionally) Docker Compose are installed. This may or may not work inside Windows WSL2 environment. I've not tested it and most likley will. Please give feedback if you tested this. :)

As of now, i don't have a raspbery Pi. WB0OEW gave me the feedback, that the docker-compose variant doesn't work on his Pi4, we're going to work that out.

Install/Usage

Docker (Hard mode)

  1. Check out this repository and change into it
  2. Copy the config_example.env to config.env and edit to your liking
  3. Inside the repository, run docker build -t hamclock .
  4. Run Hamclock using docker run --rm --name hamclock -d -it -p 8081:8081 -p 8080:8080 --env-file config.env hamclock
  5. Enjoy WB0OEW's hard work on http://localhost:8081/live.html
  6. To stop Hamclock, run docker stop hamclock

Docker Compose (Easy mode)

  1. Check out this repository and change into it
  2. Copy the config_example.env to config.env and edit to your liking
  3. Inside the repository, run docker-compose up -d
  4. Enjoy WB0OEW's hard work on http://localhost:8081/live.html
  5. To stop Hamclock, simply run docker-compose down

Docker Compose Hybrid (Build Docker image then use it in Docker Compose)

  1. Clone this repo
    git clone https://github.com/zeidlos/hamclock-docker.git
  2. Change directory into the repo
    cd hamclock-docker
  3. Copy the config_example.env to config.env and edit to your liking
  4. Build the Docker image for the Dockerfile with this commad
    docker build -t hamclock:latest
  5. Run the container with this command
    docker-compose -f docker-compose.hybrid.yml up -d
    you can change the ports, docker network, and other things you may need by editing the docker-compose.hybrid.yml file
    Also note that if you change the port that the container is using you will need to change the address to access Hamclock
    ex: with the port changed to 9500 the address to access hamclock will be http://localhost:9500/live.html

Advanced (Server/Cloud) usage

At this point I assume you have deeper knowledge on how to use Docker and potentially Kubernetes as well as reverse proxies, so I won't bother to explain the myriad of options on how to get it to run on remote infrastructure.

Compatibility

(x) Intel based MacOS (x) Silicon based MacOS (x) Intel based Linux (Debian) (?) Rasbian (?) Windows WSL2

Issues and problems

Please let me know if you encounter any issues or problems. Ideally you include your operating system, architecture (Intel, AMD, Atom, Apple Silicon M1/2) as well as the software versions of docker and docker compose in your ticket. I'll gladly assist in any issues. You can also email me, using the email address on my QRZ-page (DO7JZ).

Contributing

If you're interested in advancing this, please use the usual workflow of forking and creating a pullrequest.

Similar projects

Chris thought this project is not maintained anymore and did want to try a different approach. If this doesn't work for you maybe give his project a try: https://github.com/ChrisRomp/hamclock-docker

Changelog

v0.01

Customize Hamclock configuration via config file

v0.00

Initial release.

Future Plans

  • Make it work on Raspbian as well.
  • Customize target resolution in build process.

Thanks to WB0OEW for his great ham radio tool! 73

hamclock-docker's People

Contributors

dkane00 avatar zeidlos avatar

Stargazers

ethzero avatar Zachary Madore avatar Matt avatar Rick Highness avatar  avatar  avatar  avatar Victor Makarov avatar Matt Gillooly avatar  avatar  avatar Tristan Greaves avatar Ryan Geyer avatar  avatar Jakers avatar

Watchers

 avatar  avatar Claude avatar

Forkers

dkane00 abpei

hamclock-docker's Issues

Issues setting values via EEPROM/hceeprom.pl

Thanks for the work you've put into this @zeidlos. How are you feeling about maintaining it? I see some open issues and a PR, with no recent activity on the code. I'd be happy to take on maintenance if you want some help, either here or by splitting the project.

That said, in addition to the problems outlined in #2 and addressed with #5, I'm having an issue with the callsign being set via the run.sh script injecting EEPROM values. Even attaching a shell to the container and running it doesn't seem to make the call sign show up correctly. I've even been talking with the HamClock author, Elwood Downey WB0OEW, about it but this got me thinking, why are we doing this way at all? It's a bit of a hack (Elwood even admits as much in the user contrib for his script) and breaks from some standard Docker conventions.

What I've done in my instance is thrown out the config and calling of hceeprom.pl altogether in my version, and instead I'm just mounting a volume to /root/.hamclock where it happily persists its configuration. On first run you'll want to trigger a /restart and go through the setup process, just like any other instance of HamClock, but I think in the end this might be less prone to quirks and therefore easier to manage.

Thoughts?

HTTP/1.1: not found

I grabbed the reop and used the docker-compose process. It pulled the info down and started but all I get is the above notice when I try to go to the page. Unfortunately, and docker logs on the container does not report anything back. I am on a Mac with Apple silicon.

A fix for lots of issues I found while trying to run this

I found many issues while trying to get this going on my linux server. I have created a branch with all the fixes and have tested the fixes and all is working. I tried to push the fixes as a separate branch for a pull request but was unable. Got a Permission denied error when trying to push the branch. Could be that I don''t know how to properly push for the pull request as I am a little new to using git but I have all the changes and fixes saved in a separate branch ready to push out if you would like them.

Issues related to updateVersion

What is updateVersion ?

What is the purpose of (run.sh): curl localhost:8080 updateVersion

Even if I remove that line, the container still stops. Details shows two related lines:

  • curl: (7) Failed to connect to localhost port 8080 after 0 ms: Couldn't connect to server
  • curl: (6) Could not resolve host: updateVersion

Config Yaml giving white space errors.

Built my config.yaml. I get the following error when I try to run.
cgaeth@A0087 hamclock-docker % docker run --rm --name hamclock -d -it -p 8081:8081 -p 8080:8080 --env-file config.yaml hamclock
docker: poorly formatted environment: variable 'CALLSIGN: "K3VDR"' contains whitespaces.

There are no spaces

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.