Trying to install docker and need yml assistance

785 views
Skip to first unread message

Adam Morgan

unread,
Feb 12, 2022, 1:58:09 PM2/12/22
to weewx-user
Hello, I have a working knowledge of docker and linux but not much beyond that.  I have used both for years and can generally follow a guide to create a container.

I found a sample yml file in the docs so I decided to try that as my installation method.  I am running Open Media Vault, which is debian.  I am trying to perform this installation using portainer and portainer will perform  a docker-compose on the yml file. 

So here is my yml file.  I am getting an error on the volume - it is telling me that volume must be a mapping and not a string.  I'd appreciate any advice as I am not sure that my other configs are correct either (I am going on what I've done for other containers).

---
version: "3.8"

volumes:
  data:/srv/dev-disk-by-label-Docker/AppData/WeeWx

services:
  weewx:
    image: felddy/weewx
    init: true
    restart: "yes"
    volumes:
      - type: bind
        source: ./data
        target: /data
    environment:
      - TIMEZONE=US/Eastern
      - WEEWX_UID=1000
      - WEEWX_GID=100
    devices:
      - "/dev/ttyUSB0:/dev/ttyUSB0"

Doug Jenkins

unread,
Feb 12, 2022, 2:20:14 PM2/12/22
to weewx...@googlegroups.com
Adam:

I am also using Portainer with Docker. I am using Ubuntu, but the commands and approach are the same.

The issue that you have is that you need to bind the container's volume to a local volume. While the volume tag works, I always found this to work.

Also I see a few issues with your yaml definition:

1. Your Environment Variable for timezone should be TZ=America/New_York.
2. your WeeWX user id and group id look off. run uid on the terminal and see what your group id and user ids are and update the file. most likely they are 1000 each.
3. While device mapping is allowed, I could not get it to properly work in portainer. The only way I got it to work is by adding the line "privileged: true". This has the container run with sudo privileges and exposes the /dev directory to the container. That way WeeWX can communicate directly with your USB device. 
  (PS: If someone has a way to run this with standard privileges, I am all ears!)
4. I use mitcht02/weewx:4:5:1 docker image from Tom Mitchell. His image has been up to date and runs WeeWx nicely in a dockerized way. 

so I modified your yaml file below with those changes. Give it a go and let me know if you have any questions.


version: "3.8"


services:
  weewx:
    image: felddy/weewx
    init: true
    restart: "yes"
    privileged: true
    volumes:
      - /srv/dev-disk-by-label-Docker/AppData/WeeWx/:/home/weewx/conf/
    environment:
      - TZ=TZ=America/New_York
      - WEEWX_UID=1000
      - WEEWX_GID=1000

DDJ

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a502db19-07dd-4616-8938-6d23aba3b116n%40googlegroups.com.


Adam Morgan

unread,
Feb 12, 2022, 6:06:09 PM2/12/22
to weewx-user
Thank you so much Doug!  That is fantastic information.  I have one more question that I meant to ask earlier.  Is there a way to change the port to something other than 8080 in the creation step?  I have another container using that port.  Or can that be done later?

vince

unread,
Feb 12, 2022, 6:13:04 PM2/12/22
to weewx-user
Try adding:

    ports:
      - 8888:8080


To map container port 8080 to host port 8888 (as an example)

Doug Jenkins

unread,
Feb 12, 2022, 6:17:56 PM2/12/22
to weewx...@googlegroups.com
yes, you can map any port from the internal container to the external machine. For example, if you want to map the container's http port (80) to an external port 91, this is what you would do:


version: "3.8"


services:
  weewx:
    image: felddy/weewx
    init: true
    restart: "yes"
    privileged: true
    ports:
       - 91:80
    volumes:
      - /srv/dev-disk-by-label-Docker/AppData/WeeWx/:/home/weewx/conf/
    environment:
      - TZ=TZ=America/New_York
      - WEEWX_UID=1000
      - WEEWX_GID=1000

One thing if you are going to publish your weewx website to the public internet, you want to run a Proxy Manager in front of it. I recommend Nginx Proxy Manager. It will accept traffic for multiple websites domains and route it to specific ports on your server (or other servers in your network). Furthermore it will handle SSL for you.

I would strongly suggest reviewing these YouTube video below in setting up Nginx proxy manager with portainer using CloudFlare. This will keep your network and your server secure and will ensure SSL on your site with no cost.


DDJ

Adam Morgan

unread,
Feb 13, 2022, 3:41:18 PM2/13/22
to weewx-user
Thank you again Doug!  Yeah, I've used nginx a bit in my day job (software developer) and it is definitely a must-have for serving sites.

I finally got a chance to give this a try and unfortunately I am getting an error:

Creating network "<myapplicationnamehere_mycustomnetwork>" with the default driver could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

I've done a bit of reading and it seems as though a variety of things can cause it.  One is having too many containers (or dead containers) - I ran 'docker network prune' to remove the dead ones but that didn't solve the problem.  Do I need to specify that this is bridged?

Adam Morgan

unread,
Feb 13, 2022, 5:34:45 PM2/13/22
to weewx-user
Ok, I got to the bottom of the previous problem.  Actually this helped me to solve a problem that I have been having for two years - I could not successfully forward ports to docker containers.  It turns out that I had openvpn running inside of one of the containers and that was causing my problem creating the weewx container AND the bigger port forwarding issue.  I am extremely happy to have solved this.

I can also see my data being spit out into the logs!  However, I do have on problem - I can't hit weewx via the browser from inside my network.   Any ideas?  It looks to be mapped correctly:

0.0.0.0:91  80/tcp
:::91  80/tcp

This is from the container's page.  If I try to hit it via the docker host url (192.168.1.100:91) I get a page cannot be found (all of my other containers look good).

vince

unread,
Feb 13, 2022, 6:05:29 PM2/13/22
to weewx-user
I'd run "docker ps -a" and look at which containers are forwarding which ports.

Adam Morgan

unread,
Feb 13, 2022, 6:54:28 PM2/13/22
to weewx-user
Thank you, that's a good thought.  I did verify that nothing else is using that port (I only have 10ish containers).

I did notice that this created a new network.  Could that be the issue?  In my limited experience I have only ever used "host".  This is a device running on my network and not local host - would that mean that I can't use the IP of the host to access it through the browser?  

Adam Morgan

unread,
Feb 13, 2022, 11:36:49 PM2/13/22
to weewx-user
Sorry, still struggling with this one.  I don't want a new network created.  Instead, I just want to bind to the host.  Any help would be greatly appreciated.  Thank you again!

Doug Jenkins

unread,
Feb 14, 2022, 3:53:00 PM2/14/22
to weewx-user
Adam:

By Default, each stack in Docker will have its own internal network. These will show up as 172.16.x.x. That is ok as docker will route traffic from the host to the container as long as you have the ports mapped correctly.

The next thing we need to check is to see if you have a http server inside the container that you are running with WeeWx. Looking at felddy's weewx-docker Dockerfile (weewx-docker/Dockerfile at develop · felddy/weewx-docker · GitHub) I did not see a http server serving the pages. So the html will not be viewable without a http server.

The best course of action here is to spin up a http server as a container. I actually do this for my setup (www.largoweather.com) using a nginx container. What i do is configure weewx to write to a directory that is shared with the container. Then I add both containers to the same yaml file and have them share the same network. 

Here is a copy of my yaml file. In it I am running Tom Mitchell's weewx container (GitHub - tomdotorg/docker-weewx: Docker image for weewx weather software) with Belchertown skin using a MQTT broker with a ngnix web server. You can modify this to your liking. If you have any questions on the configs, just let me know.

# ====== WEEWX STACK START ======
version: "2.1"
services:
  web:
    image: nginx
    container_name: weewx_web
    networks:
      - wxnet
    ports:
      - 91:80
    depends_on:
      - mqtt-broker
      - weewx-engine
    environment:
      - TZ=America/New_York
      - NGINX_HOST=<<YOUR-DOMAIN-NAME>>.com
      - NGINX_PORT=80
    volumes:
      - /media/docker/volumes/weewx/html:/usr/share/nginx/html:ro
      - /media/docker/volumes/ngnix/templates:/etc/nginx/templates
    restart: unless-stopped
 
  mqtt-broker:
    image: eclipse-mosquitto:latest
    container_name: weewx_mqtt
    networks:
      - wxnet
    environment:
      - TZ=America/New_York
    volumes:
      - /media/docker/volumes/weewx/mosquitto/config:/mosquitto/config
      - /media/docker/volumes/weewx/mosquitto/data:/mosquitto/data
      - /media/docker/volumes/weewx/mosquitto/log:/mosquitto/log
    ports:
      - 1883:1883
      - 9001:9001
    depends_on:
      - weewx-engine
    restart: unless-stopped    
 
  weewx-engine:
    image:  mitct02/weewx:4.5.1
    container_name: weewx_engine
    environment:
      - TZ=America/New_York
    networks:
      - wxnet
    privileged: true
    volumes:
      - /media/docker/volumes/weewx/config/:/home/weewx/conf/
      - /media/docker/volumes/weewx/skins/Belchertown/:/home/weewx/skins/Belchertown/
      - /media/docker/volumes/weewx/html/:/home/weewx/public_html/
    restart: unless-stopped
 
networks:
  wxnet:
    driver: bridge


# ====== WEEWX STACK STOP =======[


Adam Morgan

unread,
Feb 14, 2022, 4:41:59 PM2/14/22
to weewx-user
Thank you again Doug!  Ok, part of my issue was that I had not fully read through the docs.  I haven't done a ton with Docker and all of the other containers that I had created were for apps that had their own web server where  I would do the configuration.  I spent a few minutes with the documentation right now - I see that the config is done in the configuration file and not in a UI.  I may tackle the web server down the line - I really appreciate you including that.  I am coming from Virtual Weather Station and my main goal is uploading to WU so that I can access via Alex by using some code that I wrote in AWS.  For some reason my uploads to WU stopped working last year and their support refused to answer me.  

Adam Morgan

unread,
Feb 15, 2022, 11:08:11 PM2/15/22
to weewx-user
Hello, I finally had some time to get back to this.   I was hoping to configure my upload to WU when I noticed that my WeeWx folder is empty.  I expected at the very least to see the configuration file.   Am I missing something?  I scanned the docs - unless I am missing something it seems as though this file should have been created for me.  I used the yml configuration that was posted earlier.  

weewx.png

Adam Morgan

unread,
Feb 15, 2022, 11:14:31 PM2/15/22
to weewx-user

Just adding to last post, here are the logs on reboot:

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...

*** Running /etc/my_init.d/10_syslog-ng.init...

Feb 15 23:12:47 HAL syslog-ng[15]: syslog-ng starting up; version='3.13.2'

*** Booting runit daemon...

*** Runit started as PID 22

using

Feb 15 23:12:47 HAL weewx[30] INFO __main__: Initializing weewx version 4.6.2

Feb 15 23:12:47 HAL weewx[30] INFO __main__: Using Python 3.6.9 (default, Dec 8 2021, 21:08:43)

[GCC 8.4.0]

Feb 15 23:12:47 HAL weewx[30] INFO __main__: Platform Linux-5.10.0-0.bpo.9-amd64-x86_64-with-Ubuntu-18.04-bionic

Feb 15 23:12:47 HAL weewx[30] INFO __main__: Locale is 'en_US.UTF-8'

Feb 15 23:12:47 HAL weewx[30] INFO __main__: Using configuration file /home/weewx/weewx.conf

Feb 15 23:12:47 HAL weewx[30] INFO __main__: Debug is 0

Feb 15 23:12:47 HAL weewx[30] INFO weewx.engine: Loading station type Simulator (weewx.drivers.simulator)

Feb 15 23:12:47 HAL weewx[30] INFO weewx.engine: StdConvert target unit is 0x1

Feb 15 23:12:47 HAL weewx[30] INFO weewx.wxservices: StdWXCalculate will use data binding wx_binding

Feb 15 23:12:48 HAL cron[26]: (CRON) INFO (pidfile fd = 3)

Feb 15 23:12:48 HAL cron[26]: (CRON) INFO (Running @reboot jobs)

Feb 15 23:12:48 HAL weewx[30] INFO weewx.manager: Created and initialized table 'archive' in database 'weewx.sdb'

Feb 15 23:12:48 HAL weewx[30] INFO weewx.manager: Created daily summary tables

Feb 15 23:12:48 HAL weewx[30] INFO weewx.engine: Archive will use data binding wx_binding

Feb 15 23:12:48 HAL weewx[30] INFO weewx.engine: Record generation will be attempted in 'hardware'

Feb 15 23:12:48 HAL weewx[30] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)

Feb 15 23:12:48 HAL weewx[30] INFO weewx.restx: StationRegistry: Registration not requested.

Feb 15 23:12:48 HAL weewx[30] INFO weewx.restx: Wunderground: Posting not enabled.

Feb 15 23:12:48 HAL weewx[30] INFO weewx.restx: PWSweather: Posting not enabled.

Feb 15 23:12:48 HAL weewx[30] INFO weewx.restx: CWOP: Posting not enabled.

Feb 15 23:12:48 HAL weewx[30] INFO weewx.restx: WOW: Posting not enabled.

Feb 15 23:12:48 HAL weewx[30] INFO weewx.restx: AWEKAS: Posting not enabled.

Feb 15 23:12:48 HAL weewx[30] INFO weewx.engine: 'pyephem' detected, extended almanac data is available

Feb 15 23:12:48 HAL weewx[30] INFO __main__: Starting up weewx version 4.6.2

Feb 15 23:12:48 HAL weewx[30] INFO weewx.engine: Clock error is -0.44 seconds (positive is fast)

Feb 15 23:12:48 HAL weewx[30] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'

Feb 15 23:12:48 HAL weewx[30] INFO weewx.manager: Starting backfill of daily summaries

Feb 15 23:12:48 HAL weewx[30] INFO weewx.manager: Empty database

Feb 15 23:12:48 HAL weewx[30] INFO weewx.engine: Starting main packet loop.

vince

unread,
Feb 16, 2022, 2:24:51 AM2/16/22
to weewx-user
Wild guess is that you either tried to map to directories that don't exist, or your volume mounts aren't working.


Adam Morgan

unread,
Feb 16, 2022, 2:27:07 PM2/16/22
to weewx-user
Do you see anything wrong in the config that I posted yesterday?

Here is the view from putty:
putty.png

Adam Morgan

unread,
Feb 18, 2022, 1:24:57 AM2/18/22
to weewx-user
@DougJenkins I am hoping that you might be able to see what I am doing wrong.  I can see that the config files are being written inside the docker container and not the path in /AppData.  The weird thing is that it does create the WeeWx folder in AppData but it is empty.  


The documentation is for docker run and thus it isn't the same thing:

docker run -d --volume /Users/tom/weewx.conf:/home/weewx/weewx.conf --volume

I did try this - I ended up with a subfolder of "weex.conf" that was again empty.  

Doug Jenkins

unread,
Feb 18, 2022, 1:41:09 PM2/18/22
to weewx...@googlegroups.com
Adam:

Sorry for the late reply. I am still adjusting my gmail filters to get all the weewx-users and weewx-developer messages through.

I ran into the same problem when I started using the docker image for my custom install. I wanted to bring in a few of the popular weewx extensions (MQTT, Belchertown, Windy) yet if I recreate the container, I would have to manually re-add these extensions and then post my weewx.conf back into the solution. This can be a problem when you have to reboot the server for maintenance.

So going back to my notes and repo internally, what I did was to create my own docker image using Tom Mitchell's image, then loading the extensions and then copying my weewx.conf file back AFTER the extensions were installed. I also updated his executing script (/bin/run) to point the weewx.conf file to a specific folder (/home/weewx/config/weewx.conf). This way I can make changes to the weewx.conf, redeploy the solution, rebuild the image, etc.

To help understand all of this (as this took some time to set up as I was learning docker), I created a public github repo that has all of these files and configurations set so you can see how I set up my station. All of the sensitive items have been removed, so you will need to go through the config files and update them for your station.


Please let me know if this helps and let me know the next issue that you run into.

DDJ


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Adam Morgan

unread,
Feb 18, 2022, 3:03:36 PM2/18/22
to weewx-user
Thank you again Doug!  I can't tell you how much I appreciate it.

Ok, I think I got most of what you are saying.  So for your example I would be copying all of the files in your repo to the /weewx folder on my host, modify the yml file, and then execute the config.sh file?

Doug Jenkins

unread,
Feb 20, 2022, 2:31:08 PM2/20/22
to weewx...@googlegroups.com
Essentially yes. I would login with the user account that has docker access and clone my repo in the current directory (~). Then I would configure the docker-compose.yml and the weewx.conf files inside my config folder and use the shell script to build it out.

You probably have to tinker with the setup as I got this to work on Ubuntu and not on Debian.

Also, you do not have to use MariaDB with weewx. I like using MariaDB because I like to query the live db to run checks and to build a new interface in the future.

Let me know where you end up. I am checking my email daily now so I can be more available to help.

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/fy3nqJ34Ho0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b6283982-ca35-4220-80cd-fa4f770b11e7n%40googlegroups.com.

Adam Morgan

unread,
Feb 20, 2022, 7:15:42 PM2/20/22
to weewx-user
Wow, thank you again Doug!  You clearly put a lot of effort into this.

Ok, a lot to unpack here.   I downloaded your repo into a setup folder on my server and updated .conf with the values that seemed to make sense to me.  
 I already have MariaDB running in another container for Kodi but I left all of that in the docker compose file because in the short term I'll be happy if I can just get this to work.  I did add the new user and databases to my existing MariaDB installation, just in case.

I then ran all of your commands by hand.  The first was running "docker build ." to initiate the build.  I then did each command one by one.  That seemed to go well - I see the image and the folders populated as expected.  Now what?  Should I see a container?  I do see the image pulled down and there is a lot of information inside of it that came from the files in your repo.  

here is the output from the docker build:

build .
Sending build context to Docker daemon  1.637MB
Step 1/9 : FROM mitct02/weewx:4.5.1
4.5.1: Pulling from mitct02/weewx
23884877105a: Already exists
bc38caa0f5b9: Already exists
2910811b6c42: Already exists
36505266dcc6: Already exists
07a923053093: Already exists
776b7eaf0a03: Already exists
bc700a6f34b5: Already exists
67577fd8c8eb: Pull complete
31df857523bd: Pull complete
ecd6e0ddf182: Pull complete
bb9aba96460d: Pull complete
3d3e5fc6d05d: Pull complete
6754665d41ef: Pull complete
6135e7b935ea: Pull complete
9b10839751a1: Pull complete
3017c664af94: Pull complete
e844a912b1d5: Pull complete
7b5bb4deb379: Pull complete
f1c5b3b47d82: Pull complete
7d1f4fb1b49c: Pull complete
7bd1db2eac8f: Pull complete
bfc9e864b8db: Pull complete
c0191d0c7ecb: Pull complete
Digest: sha256:8416c7b57ff50e43538218c8834bdce0238aee0aaaf13dc812148c101862ee9f
Status: Downloaded newer image for mitct02/weewx:4.5.1
 ---> 92c42aedddc5
Step 2/9 : WORKDIR /home/weewx
 ---> Running in 5d7735458fe1
Removing intermediate container 5d7735458fe1
 ---> 8d4a708a3959
Step 3/9 : ADD config/weewx.conf /home/weewx/
 ---> 51a0752dad14
Step 4/9 : ADD extensions/*.zip /home/weewx/extensions/
 ---> a0e7a30a9b7e
Step 5/9 : ADD bin/run /etc/service/weewx/
 ---> 431aa0d66516
Step 6/9 : RUN chmod 755 /etc/service/weewx/run
 ---> Running in 06d3d16a3ecc
Removing intermediate container 06d3d16a3ecc
 ---> c7cd9bed645c
Step 7/9 : RUN ./bin/wee_extension --config=weewx.conf --install /home/weewx/ext                      ensions/weewx-mqtt.zip
 ---> Running in 993acec9f543
Request to install '/home/weewx/extensions/weewx-mqtt.zip'
Extracting from zip archive /home/weewx/extensions/weewx-mqtt.zip
Saving installer file to /home/weewx/bin/user/installer/mqtt
Saved configuration dictionary. Backup copy at weewx.conf.20220220133527
Finished installing extension '/home/weewx/extensions/weewx-mqtt.zip'
Removing intermediate container 993acec9f543
 ---> 29570a351dde
Step 8/9 : RUN ./bin/wee_extension --config=weewx.conf --install /home/weewx/ext                      ensions/weewx-belchertown-master.zip
 ---> Running in 92413d3b743d
Request to install '/home/weewx/extensions/weewx-belchertown-master.zip'
Extracting from zip archive /home/weewx/extensions/weewx-belchertown-master.zip
Saving installer file to /home/weewx/bin/user/installer/Belchertown
Saved configuration dictionary. Backup copy at weewx.conf.20220220133530
Finished installing extension '/home/weewx/extensions/weewx-belchertown-master.z                      ip'
Removing intermediate container 92413d3b743d
 ---> b9849746c7d4
Step 9/9 : RUN ./bin/wee_extension --config=weewx.conf --install /home/weewx/ext                      ensions/weewx-windy.zip
 ---> Running in 98b470bf89fe
Request to install '/home/weewx/extensions/weewx-windy.zip'
Extracting from zip archive /home/weewx/extensions/weewx-windy.zip
Saving installer file to /home/weewx/bin/user/installer/windy
Saved configuration dictionary. Backup copy at weewx.conf.20220220133534
Finished installing extension '/home/weewx/extensions/weewx-windy.zip'
Removing intermediate container 98b470bf89fe
 ---> 640a0fa3c5b3
Successfully built 640a0fa3c5b3
root@HAL:/srv/dev-disk-by-label-Docker/AppData/weewx_setup/docker-build# cd ..
root@HAL:/srv/dev-disk-by-label-Docker/AppData/weewx_setup# cp docker-build/conf                      ig/weewx.conf /srv/dev-disk-by-label-Docker/AppData/weewx/config/
root@HAL:/srv/dev-disk-by-label-Docker/AppData/weewx_setup# cp -r skins/* /srv/d                      ev-disk-by-label-Docker/AppData/weewx/skins/
root@HAL:/srv/dev-disk-by-label-Docker/AppData/weewx_setup# cp mosquitto_mqtt/co                      nfig/* /srv/dev-disk-by-label-Docker/AppData/weewx/mosquitto/config/

vince

unread,
Feb 20, 2022, 7:53:33 PM2/20/22
to weewx-user
On Sunday, February 20, 2022 at 11:15:42 AM UTC-8 muchgoo...@gmail.com wrote:
I then ran all of your commands by hand.  The first was running "docker build ." to initiate the build.  I then did each command one by one.  That seemed to go well - I see the image and the folders populated as expected.  Now what?  Should I see a container? 

You guys might want to consider taking this one offline to email at this point, but.......

Tom - I'd suggest you do might some more reading up on Docker....
(do https://www.docker.com/101-tutorial - it's pretty good)
  • An "image" is a built configured reusable thing.
  • A "container" is a running instance of that image. 
  • Building an image ala 'docker build' or 'docker-compose build' does not create a running instance (container) of that image.
  • You have to do "docker run' or 'docker-compose up' to start a container running.
  • Changes made while building an image persist.
  • Changes made within a running container go 'poof' when the container stops
What his scripts are doing is populating an external mounted directory under /srv on persistent storage.

But blindly running somebody else's script without spinning yourself up a bit more on how Docker works is just going to be confusing and frustrating.

Adam Morgan

unread,
Feb 20, 2022, 9:36:58 PM2/20/22
to weewx-user
Sorry, did a private response by mistake a minute ago.  I do understand the basics of docker.   This particular approach is a bit new to me so I thought I would ask what to do next.  The config files are in place - is it a matter of just issuing a docker run with the image?  

Doug Jenkins

unread,
Feb 20, 2022, 9:43:15 PM2/20/22
to weewx...@googlegroups.com
Yes. I would run docker-compose up and check to see if the docker containers are running. If you are using portainer, check the stack there.

You will know if weewx is working by reviewing the log from the docker container. Again I like using portainer for this as the GUI allows an easy interface to see the results.

Common issues that you will run into are permissions to the host directories that weewx/MQTT/NGINX need to access. then the next possible issue would be access to your weather station hardware (assumed you plugged the console to the RPI). You will need to debug this a bit to get it to work properly.

if you need to debug the solution, just edit the weewx.conf located in your config folder on the host and restart the containers. Weewx.conf is the main file that governs weewx. 

DDJ

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Jim Munro

unread,
Oct 9, 2022, 10:43:40 PM10/9/22
to weewx-user
Hi,
Trying to do a weewx/mariadb/nginx docker install with MQTTSubscribe as a driver in weewx.  Everything seems to build for weewx OK.  But running into a password problem in weewx or mariadb containers.  I have some basic docker knowledge.  Here is my docker-compose.yml and snippet of weewx log.
Suggestions?
I have modified the original docker-compose and weewx.conf files.  I am also using a different mosquitto broker on the local lan so I am not building it as a container.
docker-compose.yml
weewx-docker-stack-main_weewx_syslog.txt

Jim Munro

unread,
Oct 10, 2022, 2:31:09 PM10/10/22
to weewx-user

Got it solved by adding user weewx'@'weewx_data_engine.weewx-docker-stack-main_wxnet in mariadb. Creating database weewx_acurite and granting privileges.
I was using the @dougjenkins image here  WeeWX Docker Stack Example (NGINX | MQTT | WEEWX | MARIADB)
Reply all
Reply to author
Forward
0 new messages