Re: [weewx-user] Trying to install docker and need yml assistance

2022-10-10 Thread Jim Munro

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)  
On Sunday, October 9, 2022 at 6:43:40 p.m. UTC-4 Jim Munro wrote:

> 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.
>
> On Sunday, February 20, 2022 at 4:43:15 p.m. UTC-5 do...@dougjenkins.com 
> wrote:
>
>> 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
>>
>> On Sun, Feb 20, 2022 at 4:37 PM Adam Morgan  wrote:
>>
>>> 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?  
>>>
>>> On Sunday, February 20, 2022 at 2:53:33 PM UTC-5 vince wrote:
>>>
 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.

 -- 
>>> 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/63f503fd-c774-45c9-9690-31c9fc7f3b7bn%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/1a6d99e2-927d-4557-b639-0d8b4c64537fn%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-10-09 Thread Jim Munro
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.

On Sunday, February 20, 2022 at 4:43:15 p.m. UTC-5 do...@dougjenkins.com 
wrote:

> 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
>
> On Sun, Feb 20, 2022 at 4:37 PM Adam Morgan  wrote:
>
>> 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?  
>>
>> On Sunday, February 20, 2022 at 2:53:33 PM UTC-5 vince wrote:
>>
>>> 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.
>>>
>>> -- 
>> 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/63f503fd-c774-45c9-9690-31c9fc7f3b7bn%40googlegroups.com
>>  
>> 
>> .
>>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/bc61d7f6-ca0e-4ddc-bd5f-0ea8619c2d4dn%40googlegroups.com.


docker-compose.yml
Description: Binary data
Oct  9 18:17:01 87539a9d575c CRON[43]: (root) CMD (   cd / && run-parts 
--report /etc/cron.hourly)
Oct  9 18:17:18 87539a9d575c weewx[31] INFO __main__: retrying...
Oct  9 18:17:18 87539a9d575c weewx[31] INFO __main__: Using configuration file 
/home/weewx/conf/weewx.conf
Oct  9 18:17:18 87539a9d575c weewx[31] INFO __main__: Debug is 0
Oct  9 18:17:18 87539a9d575c weewx[31] INFO weewx.engine: Loading station type 
MQTTSubscribeDriver (user.MQTTSubscribe)
Oct  9 18:17:18 87539a9d575c weewx[31] INFO user.MQTTSubscribe: (Driver) 
Version is 2.2.2
Oct  9 18:17:18 87539a9d575c weewx[31] INFO user.MQTTSubscribe: (Driver) Log 
level: 0
Oct  9 18:17:18 87539a9d575c weewx[31] INFO user.MQTTSubscribe: (Driver) Log 
debug setting: 0
Oct  9 18:17:18 87539a9d575c weewx[31] INFO 

Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-20 Thread Doug Jenkins
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

On Sun, Feb 20, 2022 at 4:37 PM Adam Morgan 
wrote:

> 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?
>
> On Sunday, February 20, 2022 at 2:53:33 PM UTC-5 vince wrote:
>
>> 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.
>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/63f503fd-c774-45c9-9690-31c9fc7f3b7bn%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CACC0i0yGMaCoT0U6F6ijA%2BVdxiOiW4A4OWi%3DDJLQhRm9UBjb7Q%40mail.gmail.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-20 Thread Adam Morgan
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?  

On Sunday, February 20, 2022 at 2:53:33 PM UTC-5 vince wrote:

> 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.
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/63f503fd-c774-45c9-9690-31c9fc7f3b7bn%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-20 Thread vince
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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/dd8d9bc1-77ec-43f9-a2c2-9a06ac9580bcn%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-20 Thread Adam Morgan
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/
On Sunday, February 20, 2022 at 9:31:08 AM UTC-5 do...@dougjenkins.com 
wrote:

> 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 

Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-20 Thread Doug Jenkins
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.

On Fri, Feb 18, 2022, 10:03 AM Adam Morgan  wrote:

> 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?
>
>
>
> On Friday, February 18, 2022 at 8:41:09 AM UTC-5 do...@dougjenkins.com
> wrote:
>
>> 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.
>>
>> here is that link : WeeWX Docker Stack Example (NGINX | MQTT | WEEWX |
>> MARIADB) 
>>
>> Please let me know if this helps and let me know the next issue that you
>> run into.
>>
>> DDJ
>>
>>
>> On Thu, Feb 17, 2022 at 8:25 PM Adam Morgan  wrote:
>>
>>> @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.
>>>
>>> https://hub.docker.com/r/mitct02/weewx
>>>
>>> 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.
>>>
>>>
>>>
>>> On Wednesday, February 16, 2022 at 9:27:07 AM UTC-5 Adam Morgan wrote:
>>>
 Do you see anything wrong in the config that I posted yesterday?

 Here is the view from putty:



 On Tuesday, February 15, 2022 at 9:24:51 PM UTC-5 vince wrote:

> Wild guess is that you either tried to map to directories that don't
> exist, or your volume mounts aren't working.
>
>
> --
>>> 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/7f7a2556-0ba4-4a86-80bb-7c3a120dd335n%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>>
>> --
> 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+unsubscr...@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
> 
> .
>

-- 
You received this message because you are subscribed to 

Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-18 Thread Adam Morgan
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?



On Friday, February 18, 2022 at 8:41:09 AM UTC-5 do...@dougjenkins.com 
wrote:

> 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.
>
> here is that link : WeeWX Docker Stack Example (NGINX | MQTT | WEEWX | 
> MARIADB) 
>
> Please let me know if this helps and let me know the next issue that you 
> run into.
>
> DDJ
>
>
> On Thu, Feb 17, 2022 at 8:25 PM Adam Morgan  wrote:
>
>> @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.  
>>
>> https://hub.docker.com/r/mitct02/weewx
>>
>> 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.  
>>
>>
>>
>> On Wednesday, February 16, 2022 at 9:27:07 AM UTC-5 Adam Morgan wrote:
>>
>>> Do you see anything wrong in the config that I posted yesterday?
>>>
>>> Here is the view from putty:
>>>
>>>
>>>
>>> On Tuesday, February 15, 2022 at 9:24:51 PM UTC-5 vince wrote:
>>>
 Wild guess is that you either tried to map to directories that don't 
 exist, or your volume mounts aren't working.


 -- 
>> 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/7f7a2556-0ba4-4a86-80bb-7c3a120dd335n%40googlegroups.com
>>  
>> 
>> .
>>
>
>
>
>

-- 
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+unsubscr...@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.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-18 Thread Doug Jenkins
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.

here is that link : WeeWX Docker Stack Example (NGINX | MQTT | WEEWX |
MARIADB) 

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

DDJ


On Thu, Feb 17, 2022 at 8:25 PM Adam Morgan 
wrote:

> @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.
>
> https://hub.docker.com/r/mitct02/weewx
>
> 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.
>
>
>
> On Wednesday, February 16, 2022 at 9:27:07 AM UTC-5 Adam Morgan wrote:
>
>> Do you see anything wrong in the config that I posted yesterday?
>>
>> Here is the view from putty:
>>
>>
>>
>> On Tuesday, February 15, 2022 at 9:24:51 PM UTC-5 vince wrote:
>>
>>> Wild guess is that you either tried to map to directories that don't
>>> exist, or your volume mounts aren't working.
>>>
>>>
>>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/7f7a2556-0ba4-4a86-80bb-7c3a120dd335n%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CACC0i0zSvRmGg9hVpQPbzn9yaOaM-Ri4AOBW3s3Arsz4uLn1Wg%40mail.gmail.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-17 Thread Adam Morgan
@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.  

https://hub.docker.com/r/mitct02/weewx

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.  



On Wednesday, February 16, 2022 at 9:27:07 AM UTC-5 Adam Morgan wrote:

> Do you see anything wrong in the config that I posted yesterday?
>
> Here is the view from putty:
>
>
>
> On Tuesday, February 15, 2022 at 9:24:51 PM UTC-5 vince wrote:
>
>> Wild guess is that you either tried to map to directories that don't 
>> exist, or your volume mounts aren't working.
>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7f7a2556-0ba4-4a86-80bb-7c3a120dd335n%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-16 Thread Adam Morgan
Do you see anything wrong in the config that I posted yesterday?

Here is the view from putty:



On Tuesday, February 15, 2022 at 9:24:51 PM UTC-5 vince wrote:

> Wild guess is that you either tried to map to directories that don't 
> exist, or your volume mounts aren't working.
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/5aaa609b-7bc7-4f0a-9594-7bbe4f9aaed9n%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-15 Thread vince
Wild guess is that you either tried to map to directories that don't exist, 
or your volume mounts aren't working.


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/5baed84e-a7ad-49d3-850b-5fa95f7b4571n%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-15 Thread Adam Morgan

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.
On Tuesday, February 15, 2022 at 6:08:11 PM UTC-5 Adam Morgan wrote:

> 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.  
>
> [image: weewx.png]
>
> On Monday, February 14, 2022 at 11:41:59 AM UTC-5 Adam Morgan wrote:
>
>> 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.  
>>
>>
>> On Monday, February 14, 2022 at 10:53:00 AM UTC-5 do...@dougjenkins.com 
>> wrote:
>>
>>> 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 
>>> 

Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-15 Thread Adam Morgan
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.  

[image: weewx.png]

On Monday, February 14, 2022 at 11:41:59 AM UTC-5 Adam Morgan wrote:

> 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.  
>
>
> On Monday, February 14, 2022 at 10:53:00 AM UTC-5 do...@dougjenkins.com 
> wrote:
>
>> 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=<>.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 ===[
>>
>>
>>
>> On Sunday, February 13, 2022 at 6:36:49 PM UTC-5 muchgoo...@gmail.com 
>> wrote:
>>
>>> 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!
>>>
>>> On Sunday, February 13, 2022 at 1:54:28 PM UTC-5 Adam Morgan wrote:
>>>
 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.  

Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-14 Thread Adam Morgan
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.  


On Monday, February 14, 2022 at 10:53:00 AM UTC-5 do...@dougjenkins.com 
wrote:

> 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=<>.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 ===[
>
>
>
> On Sunday, February 13, 2022 at 6:36:49 PM UTC-5 muchgoo...@gmail.com 
> wrote:
>
>> 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!
>>
>> On Sunday, February 13, 2022 at 1:54:28 PM UTC-5 Adam Morgan wrote:
>>
>>> 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?  
>>>
>>> On Sunday, February 13, 2022 at 1:05:29 PM UTC-5 vince wrote:
>>>
 I'd run "docker ps -a" and look at which containers are forwarding 
 which ports.

>


-- 
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 

Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-14 Thread Doug Jenkins
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=<>.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 ===[



On Sunday, February 13, 2022 at 6:36:49 PM UTC-5 muchgoo...@gmail.com wrote:

> 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!
>
> On Sunday, February 13, 2022 at 1:54:28 PM UTC-5 Adam Morgan wrote:
>
>> 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?  
>>
>> On Sunday, February 13, 2022 at 1:05:29 PM UTC-5 vince wrote:
>>
>>> I'd run "docker ps -a" and look at which containers are forwarding 
>>> which ports.
>>>

>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/1d94b41b-62f8-43c6-9799-8a53289415e9n%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-13 Thread Adam Morgan
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!

On Sunday, February 13, 2022 at 1:54:28 PM UTC-5 Adam Morgan wrote:

> 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?  
>
> On Sunday, February 13, 2022 at 1:05:29 PM UTC-5 vince wrote:
>
>> I'd run "docker ps -a" and look at which containers are forwarding which 
>> ports.
>>
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/cee64f34-9db1-4b8f-9bae-f00d76d7ce65n%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-13 Thread Adam Morgan
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?  

On Sunday, February 13, 2022 at 1:05:29 PM UTC-5 vince wrote:

> I'd run "docker ps -a" and look at which containers are forwarding which 
> ports.
>
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/b4d550eb-2afc-458e-b1c3-d01a248d214fn%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-13 Thread vince
I'd run "docker ps -a" and look at which containers are forwarding which 
ports.

>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ca348fba-0829-4c2a-98fb-b38282c5d41cn%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-13 Thread Adam Morgan
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).

On Sunday, February 13, 2022 at 10:41:18 AM UTC-5 Adam Morgan wrote:

> 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 "" 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?
> On Saturday, February 12, 2022 at 1:17:56 PM UTC-5 do...@dougjenkins.com 
> wrote:
>
>> 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.
>>
>> https://youtu.be/Ha8NIAOsNvo
>>
>>
>> DDJ
>>
>> On Sat, Feb 12, 2022 at 1:06 PM Adam Morgan  wrote:
>>
>>> 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?
>>>
>>> On Saturday, February 12, 2022 at 9:20:14 AM UTC-5 do...@dougjenkins.com 
>>> wrote:
>>>
 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
   

Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-13 Thread Adam Morgan
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 "" 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?
On Saturday, February 12, 2022 at 1:17:56 PM UTC-5 do...@dougjenkins.com 
wrote:

> 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.
>
> https://youtu.be/Ha8NIAOsNvo
>
>
> DDJ
>
> On Sat, Feb 12, 2022 at 1:06 PM Adam Morgan  wrote:
>
>> 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?
>>
>> On Saturday, February 12, 2022 at 9:20:14 AM UTC-5 do...@dougjenkins.com 
>> wrote:
>>
>>> 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
>>>
>>> On Sat, Feb 12, 2022 at 8:58 AM Adam Morgan  
>>> wrote:
>>>
 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


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-12 Thread Doug Jenkins
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.

https://youtu.be/Ha8NIAOsNvo


DDJ

On Sat, Feb 12, 2022 at 1:06 PM Adam Morgan 
wrote:

> 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?
>
> On Saturday, February 12, 2022 at 9:20:14 AM UTC-5 do...@dougjenkins.com
> wrote:
>
>> 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
>>
>> On Sat, Feb 12, 2022 at 8:58 AM Adam Morgan  wrote:
>>
>>> 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"
>>>
>>> --
>>> 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
>>> 
>>> .
>>>
>>
>>
>> --
> You received this message 

Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-12 Thread vince
Try adding:

ports:
  - :8080

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

On Saturday, February 12, 2022 at 10:06:09 AM UTC-8 muchgoo...@gmail.com 
wrote:

> 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?
>
> On Saturday, February 12, 2022 at 9:20:14 AM UTC-5 do...@dougjenkins.com 
> wrote:
>
>> 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
>>
>> On Sat, Feb 12, 2022 at 8:58 AM Adam Morgan  wrote:
>>
>>> 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"
>>>
>>> -- 
>>> 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
>>>  
>>> 
>>> .
>>>
>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a2d02c04-0202-4517-91a6-34a19d0822a8n%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-12 Thread Adam Morgan
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?

On Saturday, February 12, 2022 at 9:20:14 AM UTC-5 do...@dougjenkins.com 
wrote:

> 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
>
> On Sat, Feb 12, 2022 at 8:58 AM Adam Morgan  wrote:
>
>> 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"
>>
>> -- 
>> 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
>>  
>> 
>> .
>>
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/fade2edd-f35e-4eec-b94e-3eff9ea0434cn%40googlegroups.com.


Re: [weewx-user] Trying to install docker and need yml assistance

2022-02-12 Thread Doug Jenkins
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

On Sat, Feb 12, 2022 at 8:58 AM Adam Morgan 
wrote:

> 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"
>
> --
> 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+unsubscr...@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
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CACC0i0zcsXuNyObc0zEVMy0PWgsD_WtbuJfYpy-%2B-AC2UxHOJA%40mail.gmail.com.


[weewx-user] Trying to install docker and need yml assistance

2022-02-12 Thread Adam Morgan
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"

-- 
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+unsubscr...@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.