Git Product home page Git Product logo

comet-docker's People

Contributors

hobadee avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

comet-docker's Issues

Updating config with `jq` is ugly

I'm currently resorting to an ugly hack to get jq to properly update the config file. There is likely a much better way of getting jq to update a json file as a single operation, but it was late and I gave up and created this ugly hack.

We need to find the proper way of using jq to update a file, especially given further features will likely rely messing with the config file, and this would get really ugly really quickly if we continued in this manner.

For posterity, here is the reasoning behind my hack:
If doing cat | jq > file, the file handle is opened and the file truncated before cat begins to read, so you end up with an empty file. This also occurs when attempting jq file > file. To get around this, we copy the config to a tempfile, then we read that tempfile while writing the output to the original file. Finally we clean up the tempfile.

Allow settings IP Allowlists through environment variables

Allow settings IP Allowlists through environment variables. Apply to all admin users, which should be fairly simple with jq

Example config JSON:

{
  "AdminUsers":
    [
      {
          "IPWhitelist": "127\\.0\\.0\\.[0-9]{1,3}|172\\.0\\.0\\.1"
      }
    ]
}

Following jq filter does the trick: jq '.AdminUsers[].IPWhitelist = "127\\.0\\.0\\.1"' cometd.cfg

Depends on #2

Allow changing ListenAddresses through evironment variables

Allow adding/changing ListenAddresses via environment variables. Perhaps use comma delimitation for multiple entries?

JSON of config is as follows:

{
  "ListenAddresses": [
    {
      "ListenAddress": "0.0.0.0:8060"
    },
    {
      "ListenAddress": "0.0.0.0:443",
      "AutoSSLDomains": "backup.example.com"
    },
    {
      "ListenAddress": "0.0.0.0:443",
      "SSLCertPath": "",
      "SSLIntermediate": "",
      "SSLCertKey": ""
    },
    {
      "ListenAddress": "0.0.0.0:443",
      "SSLPfxPath": "",
      "SSLPfxPassword": ""
    }
  ]
}

Depends on #2

Allow changing Constellation Config through environment variables

Allowing the changing of the Constellation Config through environment variables would likely help out in automated clusters.

Perhaps a comma-separated list as an environment variable?

Example of the config file JSON:

{
  "ConstellationRole": {
    "RoleEnabled": true,
    "DeleteUnusedData": false,
    "Servers": [
      {
        "Type": "comet",
        "Description": "localhost",
        "RemoteAddress": "$self$"
      }
    ]
  }
}

Depends on #2

[CRITICAL] Docker volume won't allow updating

Currently the Docker volume is set to /opt/cometd/. This is too greedy. (My fault. Still new-ish to Dockerfiles and didn't think out the ramifications.) Since that folder contains the binaries, updating won't work properly since they will be stored in the volume.

This will be a bit ugly to pick apart, as it likes to have everything in the same folder. Perhaps symlinks will fix the issue, or we may need to figure something else out.

We should also keep in mind current users (coughmecough) who will need to upgrade, and how whatever fix is determined will be applied so data isn't lost.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.