[minor] update Dockerfile and parameters.yaml
- In the Dockerfile, added a new parameter "-parfile" with value "conf/parameters.yaml" to the CMD command in survBot.py. - In parameters.yaml, made changes to the EMAIL section: - Added comments explaining how to specify mail server and credentials. - Added auth_type field with value "SSL". - Updated port field to 465 for SSL. - Updated user and password fields to read from environment variables or docker secrets. - Added comments explaining how to specify mail recipients, sender, and blacklists. - Moved location of simulate_fail.json to conf/simulate_fail.json for easier Docker integration
This commit is contained in:
parent
cf12500ec2
commit
3f07b7bcd0
@ -8,4 +8,4 @@ RUN apt update && apt install -y bind9-host iputils-ping
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
CMD [ "python", "./survBot.py", "-html", "www" ]
|
CMD [ "python", "./survBot.py", "-html", "www", "-parfile", "conf/parameters.yaml" ]
|
||||||
|
@ -137,13 +137,18 @@ html_logo: "logo.png"
|
|||||||
|
|
||||||
# E-mail notifications
|
# E-mail notifications
|
||||||
EMAIL:
|
EMAIL:
|
||||||
mailserver: "smtp.rub.de" # mail server
|
# specify mail server and credentials
|
||||||
port: 465 # mail port
|
# port, auth_type, user and password are only required if mailserver is not set to "localhost"
|
||||||
|
# user and password can be set to "ENV" or "DOCKER" to read from environment variables or docker secrets
|
||||||
|
mailserver: "smtp.rub.de" # mail server
|
||||||
|
auth_type: "SSL" # mail authentication type, can be "SSL", "TLS" or "None"
|
||||||
|
port: 465 # mail port, default 465 for SSL, 587 for TLS
|
||||||
user: "DOCKER" # mail user, read from environment variable if set to "ENV" or from docker secret if set to "DOCKER"
|
user: "DOCKER" # mail user, read from environment variable if set to "ENV" or from docker secret if set to "DOCKER"
|
||||||
password: "DOCKER" # mail password, read from environment variable if set to "ENV" or from docker secret if set to "DOCKER"
|
password: "DOCKER" # mail password, read from environment variable if set to "ENV" or from docker secret if set to "DOCKER"
|
||||||
|
# specify mail recipients, sender and blacklists
|
||||||
addresses: ["marcel.paffrath@rub.de", "kasper.fischer@rub.de"] # list of mail addresses for info mails
|
addresses: ["marcel.paffrath@rub.de", "kasper.fischer@rub.de"] # list of mail addresses for info mails
|
||||||
sender: "RUB SeisObs <seisobs@ruhr-uni-bochum.de>" # mail sender
|
sender: "RUB SeisObs <seisobs@ruhr-uni-bochum.de>" # mail sender
|
||||||
stations_blacklist: [] # do not send emails for specific stations
|
stations_blacklist: [] # do not send emails for specific stations
|
||||||
networks_blacklist: [] # do not send emails for specific network
|
networks_blacklist: [] # do not send emails for specific network
|
||||||
# specify recipients for single stations in a yaml: key = email-address, val = station list (e.g. [1Y.GR01, 1Y.GR02])
|
# specify recipients for single stations in a yaml: key = email-address, val = station list (e.g. [1Y.GR01, 1Y.GR02])
|
||||||
external_mail_list: "mailing_list.yaml"
|
external_mail_list: "conf/mailing_list.yaml"
|
||||||
|
@ -704,7 +704,7 @@ class StationQC(object):
|
|||||||
return 'active'
|
return 'active'
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _simulated_error_check(self, key, fname='simulate_fail.json'):
|
def _simulated_error_check(self, key, fname='conf/simulate_fail.json'):
|
||||||
if not os.path.isfile(fname):
|
if not os.path.isfile(fname):
|
||||||
return
|
return
|
||||||
with open(fname) as fid:
|
with open(fname) as fid:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user