hobadee / comet-docker Goto Github PK
View Code? Open in Web Editor NEWComet Backup Dockerfile
License: MIT License
Comet Backup Dockerfile
License: MIT License
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
Allow changing authentication (LDAP) through environment variables
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. 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 admin username/password through environment variables.
Variables SHALL be:
-COMET_ADMIN_USER to change the admin username
-COMET_ADMIN_PASS to change the admin password
Depends on #2
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.