Especially in the Corona era, with decentralized work, current information is in hot demand in all places. I myself have already set up countless information systems and would like to introduce a great software called Smashing.Speaker: https://smashing.github.io/Das Smashing project was originally developed under the name Dashing by the company Shopify for the presentation of business figures. But of course you can display not only business figures. Developers from all over the world have developed Smashing - tiles so called widgets for Gitlab, Jenkins, Bamboo, Jira etc., see:https://github.com/Smashing/smashing/wiki/Additional-WidgetsDoch how to work with it now?
Step 1: Create base image
First, I create a simple Docker image that already comes with Ruby and Dashing.
$ mkdir dashing-project
$ cd dashing-project
$ mkdir dashboard
$ vim Dockerfile
From ubuntu:latest
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY dashboard/ /code/
RUN apt-get update && apt-get install -y ruby wget unzip ruby-dev build-essential tzdata nodejs && \
gem install smashing && \
apt-get clean
After that, I create the Docker image with this command:
$ docker build -t my-dashboard:latest .
Step 2: Create Dashboard
Now I can create a new dashboard with the following command:
$ docker run -it -v /path/to/my/dashing-project:/code my-dashboard:latest smashing new dashboard
Very good! Now I have to update the Dockerfile again. The new content is this:
From ubuntu:latest
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY dashboard/ /code/
RUN apt-get update && apt-get install -y ruby wget unzip ruby-dev build-essential tzdata nodejs && \
gem install smashing && \
gem install bundler && \
apt-get clean
RUN cd /code/ && \
bundle
RUN chown -R www-data:www-data /code/
USER www-data
WORKDIR /code/
EXPOSE 3030
CMD ["/usr/local/bin/bundle", "exec", "puma", "config.ru"]
In addition, the Gemfile file in the “dashboard” folder must also be adjusted:
source 'https://rubygems.org'
gem 'smashing'
gem 'puma'
I repeat the build command:
$ docker build -t my-dashboard:latest .
$ docker run -it -p 9292:9292 my-dashboard:latest
This is the basis for a good information system. You can customize all color, scripts and widgets.