Docker support for SolarView
This project allows to run SolarView in a Docker container.
Main features:
- Separation of SolarView from the main system
- Easy update of all SolarView applications with a single command (
docker pull) - Multi-architecture support (Raspberry Pi, x86 server)
Advantages:
- Up-to-date operating system and third-party packages for HTTP server, FTP upload and mail
- Separate containers for SolarView main application, SolarView proxy applications and HTTP server
- Docker Compose
Installation on Debian-based systems: sudo apt install docker-compose
- Create a
docker-compose.yml
See the examples on how to create a docker-compose.yml for your environment.
- Run:
docker-compose up -d
When the option restart: unless-stopped is configured in docker-compose.yml, SolarView is started automatically at system boot.
- Run:
docker-compose down
- Stop native SolarView
- Copy directory of native SolarView to
./data/solarview - Copy temp directory of native SolarView to
./data/solarview-temp
Example:
$ /home/pi/svrpi/stop.sh
$ cp -a /opt/svrpi ./data/solarview
$ cp -a /var/tmp ./data/solarview-tempSubdirectories for proxy applications (e.g. steca-fb, d0-fb) are not used and may safely be deleted from ./data/solarview.
In this section, the term app is used for either the SolarView main application (solarview-fb) or a SolarView proxy application (e.g. steca-fb).
There's no need to build an image because this is done automatically. The build creates images for all supported architectures with appropriate tags and labels. See one of the build repositories if you're interested in the details, e.g.
Alternatively, the build may be run manually for a single architecture and without docker labels, by running a legacy shell script. See shell-build for details.
Manually trigger the GitLab CI build or create an issue and ask the maintainer to do so.
Steps to add support for the unsupported app foo-fb:
- Create a git repository
solarview-foocontaining the file.gitlab-ci.ymlwith the following content:include: remote: 'https://github.com/git-developer/solarview-base/raw/main/.gitlab-ci.yml' variables: DOCKERFILE_URL: 'https://github.com/git-developer/solarview-base/raw/main/Dockerfile' BUILD_ARGS: 'APP_NAME=foo-fb' IMAGE_TITLE: 'SolarView Foo-Proxy'
- If the app needs special handling, customize the
.gitlab-ci.ymland/or the Dockerfile - Build the repository via GitLab CI. The images will be built and pushed to the registry that is configured in the GitLab project (e.g. Docker Hub or the GitLab internal registry).