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? On Saturday, February 12, 2022 at 1:17:56 PM UTC-5 [email protected] 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 <[email protected]> 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 [email protected] >> 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 <[email protected]> >>> 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 [email protected]. >>>> 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 [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/fade2edd-f35e-4eec-b94e-3eff9ea0434cn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/fade2edd-f35e-4eec-b94e-3eff9ea0434cn%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/eb18b0f5-eced-4f3f-b2b9-f9dcb14020ffn%40googlegroups.com.
