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 <muchgoo...@gmail.com> 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 >> >> <https://groups.google.com/d/msgid/weewx-user/a502db19-07dd-4616-8938-6d23aba3b116n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- 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.