Initial docker-compose file
Posted: Fri 09 Sep 2022 10:10 pm
I'm fighting like hell with MQTT and home assistant to work with my weather station ... but since I've been doing this I wanted to just make something public - I've been unable so far to mount MQTT without the folder going blank - but for those that want to test a docker arm64 build I have the compose file below - it's in my interest to keep this UTD atleast for the arm64 variant at this time. I've included a sample MySQL DB. It does support utils but you need to install the files yourself. But anyone that knows docker is welcome to mess about with it.
The config is a bit of a mess and you would change things like /media/DATA/WeatherServer/MXWeather to whereever you had your files located but it's something I'm working on currently
I have issues with environment variables - in my current config everything is stored in .env but I've changed it here to be a bit more sane.
You may also need to chown folders to pi:pi so it's really not for the faint of heart - but it's a start. For me - updating the image is a couple of commands affair so it's not a big issue - I just push it to dockerhub when I get a build notification.
Thanks,
Ian.
Code: Select all
version: "2.4"
services:
phpMyAdmin:
depends_on:
- MySQL
image: arm64v8/phpMyAdmin: latest
container_name: phpmyadmin
restart: always
ports:
- '8897:80'
environment:
PMA_HOST: MySQL
MySQL:
container_name: MySQL
image: mysql:latest
volumes:
- "/media/DATA/Databases/MySQL/.mysql-data/db:/var/lib/mysql"
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: ultrasecret
MYSQL_DATABASE: MXWeather
MYSQL_USER: cmx
MYSQL_PASSWORD: cmx
MXWeather:
container_name: MXWeather
image: nossieuk/mxweather:latest
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- /etc/localtime:/etc/localtime:ro
- /media/DATA/WeatherServer/MXWeather/data:/opt/CumulusMX/data
- /media/DATA/WeatherServer/MXWeather/backup:/opt/CumulusMX/backup
- /media/DATA/WeatherServer/MXWeather/log:/var/log/nginx
- /media/DATA/WeatherServer/MXWeather/MXdiags:/opt/CumulusMX/MXdiags
- /media/DATA/WeatherServer/MXWeather/config:/opt/CumulusMX/config
- /media/DATA/WeatherServer/MXWeather/publicweb:/opt/CumulusMX/publicweb
- /media/DATA/WeatherServer/MXWeather/utils:/opt/CumulusMX/utils
# - /media/DATA/WeatherServer/MXWeather/mqtt:/opt/CumulusMX/mqtt
ports:
- 8998:8998
- 89:80
I have issues with environment variables - in my current config everything is stored in .env but I've changed it here to be a bit more sane.
You may also need to chown folders to pi:pi so it's really not for the faint of heart - but it's a start. For me - updating the image is a couple of commands affair so it's not a big issue - I just push it to dockerhub when I get a build notification.
Thanks,
Ian.