ItsEcholot / ContainerNursery

Puts Docker Containers to sleep and wakes them back up when they're needed
MIT License
94 stars 6 forks source link

Fix error message when the configuration is missing a requred parameter #51

Open accforgithubtest opened 12 months ago

accforgithubtest commented 12 months ago

Does ContainerNursery require that there are no numerics in proxyHost in the config.yml file? I have got this working successfully for multiple containers, however only n8n has the below error message.

ERROR [2023-09-07 02:47:43.901 +0000]: Config contains invalid proxyHost object
    proxyHost: {
      "domain": [
        "n8n.local.host"
      ],
      "containerName": [
        "n8n"
      ],
      "proxyHost": "n8n",
      "proxyPort": 7545
    }
  - domain:
      - n8n.local.host
    containerName:
      - n8n
    proxyHost: n8n
    proxyPort: 7545
  - domain:
      - pihole.local.host
    containerName:
      - pihole
    proxyHost: pihole
    proxyPort: 7985

@ItsEcholot - Any comment / suggestions appreciated !

accforgithubtest commented 12 months ago

Figured out timeoutSeconds was missing for these two - adding timeoutSeconds resolved the issue, but the error message was misleading suggesting something was wrong with proxyHost, so may be the error message can be fixed ?

ItsEcholot commented 11 months ago

Yes you are right the entire config parsing part of this project is a bit of mess I'm afraid. Grateful if you can take a look at it and provide a Pull Request with improvements. If not I’m sure I will get around to it sometime.