-
1Build the flash
Starting off with a Raspbian Buster (Desktop) install:
- Touch ssh to enable ssh access
-
2Update the system
SSH into the system.
As per any new install of raspbian, be sure to
- Set a new password
- sudo apt-get update
- sudo apt-get upgrade
- Restart
With this we will have the baseline pi setup, with a 64 bit kernel. You can validate by using uname -a, you should see "aarch64" in the string.
-
3Install preliminary packages
We want a few extra packages.
Since this is a remote weather station, Mosh will allow for more reliable communications over a flaky network.
- sudo apt-get install mosh
Docker will allow easier operation of Weewx. Compose lets us use a single file to configure the deployment.
- curl -fsSL https://get.docker.com -o get-docker.sh
- sudo sh get-docker.sh
- sudo apt-get install -y libffi-dev libssl-dev
- sudo pip3 install docker-compose
-
4Set up Docker
All source files are available in the github repo HERE
- Download the zip of the repository
- unzip and copy the contents to a local directory
- change the MySQL password in both docker-compose.yml and weewx_meso.conf
- docker-compose up --detach
If you do not intend to use the MesoWX skin, you can use this docker-compose instead
version: '3.7' services: #Weewx weather system weewx: image: chuffine/weewx-distroless:4.1.1 volumes: - weewx_page:/home/weewx/public_html - ./weewx.conf:/home/weewx/weewx.conf restart: always privileged: true devices: - "/dev/ttyUSB0:/dev/ttyUSB0" #Nginx service webserver: image: nginx:alpine ports: - 80:80 volumes: - weewx_page:/usr/share/nginx/html:ro healthcheck: test: service nginx status || exit 1 interval: 30s timeout: 5s retries: 5 restart: always #MariaDB Database database: image: tobi312/rpi-mariadb environment: MYSQL_RANDOM_ROOT_PASSWORD: "yes" MYSQL_DATABASE: weewx MYSQL_USER: weewx MYSQL_PASSWORD: changeme volumes: - weewx_db:/var/lib/mysql healthcheck: test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD || exit 1 interval: 30s timeout: 5s retries: 5 restart: always volumes: weewx_page: weewx_db:
This removes the MesoWX configs and the php container.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.