Those items I found earlier. I have no idea, clueless, as to where the config file is located and, if it is in a docker container, how to edit it.
To help illustrate my confusion, this section I find difficult to understand /my comments/:
Configuration file vs. environment variables
For the settings, you can either use a configuration file or environment variables.
When you use the Docker Compose based setup, you can include a configuration file by adding the following list item under the volumes: key in the grampsweb: block:
/Did not find that in the example config file/
- /path/to/config.cfg:/app/config/config.cfg
/If I open a shell in the gramps container, I only find “config/config.cfg” which is empty. “ls /apps/config/config.cfg” produces “no such file or directory”/
where /path/to/config.cfg is the path to the config file in your server’s file system (the right-hand side refers to the path in the container and must not be changed).
/The left hand side is what then? What does the “-” character signify?/
If these are fundamental “docker” matters, fine, I can retreat a bit and splash in that pool for a bit.
But, then what? How would that take effect? “docker-compose up -d” once again?
If one chooses a “config file”, per the example further down in the doc, how does one define (hence store) the config file? The already defined items seem to be elusive to any tools I have attempted.
In the example: “- /path/to/config.cfg:/app/config/config.cfg”, where is one to create this “config.cfg” file, in root accessible directory in the “normal OS” or within a container (which seems beyond my skill level)?
Please humor my ignorance and leisurely grasp of “new stuff”. “gramps” can describe more that a project, you know.
Pursing one path, edited docker-compose.yml as follows
. . . .
environment:
GRAMPSWEB_TREE: “Gramps Web” # will create a new tree if not exists
GRAMPSWEB_CELERY_CONFIG__broker_url: “redis://grampsweb_redis:6379/0”
GRAMPSWEB_CELERY_CONFIG__result_backend: “redis://grampsweb_redis:6379/0”
GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://grampsweb_redis:6379/1
GRAMPSWEB_EMAIL_HOST: “192.168.0.123”
GRAMPSWEB_EMAIL_PORT: 143
GRAMPSWEB_EMAIL_USE_TLS: False
GRAMPSWEB_FROM_EMAIL: “gramps@my-fam.com”
. . .
Please note I had no clue regarding quote marks usage, so, let the vim editor guide me, with it’s pretty color formatting. On that note, not all the "redis url’s: are quoted. Is that correct? Does it matter? What are the rules?
Tried docker-compose down, then docker-compose up. Nothing seemed broken, but, neither did email work.
Tailing docker log for grampsweb_celery does show an attempt, with this snippet, which implies bodged values in my values?
Also, what guise does gramps/docker send mail? -------------------------- Traceback (most recent call last):
** File “/usr/local/lib/python3.11/dist-packages/celery/app/trace.py”, line 477, in trace_task**
** R = retval = fun(args, kwargs)
** ^^^^^^^^^^^^^^^^^^^^*
** File “/usr/local/lib/python3.11/dist-packages/gramps_webapi/util/celery.py”, line 20, in call**
** return self.run(args, kwargs)
** ^^^^^^^^^^^^^^^^^^^^^^^^^*
** File “/usr/local/lib/python3.11/dist-packages/gramps_webapi/api/tasks.py”, line 68, in send_email_reset_password**
** send_email(subject=subject, body=body, to=[email])**
** File “/usr/local/lib/python3.11/dist-packages/gramps_webapi/api/util.py”, line 412, in send_email**
** raise ValueError(“Connection was refused.”)** ValueError: Connection was refused. ------------------
Discovered how to display various things including Environment Variables.
The ones I specified in docker-compose.yml did not take effect.
Seems the quote marks have no effect on the environment variable values, apparently.
Still unable to send mail, logs say connection refused. So apparently it can send email. Dawned on me that perhaps it could not send except to localhost or locally bound, to host, IP, so changed the IP in docker-config.yml and did restart of container.
Much to my dismay, the environment variable did not change. Tried container stop then container start. Still no joy, systemctl restart docker.service, also not joy. Reboot VM. No joy.
When attempting to recover password via grampsweb login screen, the email does not arrive, appears to not even get out of the gramps container environment.
After installing telnet in the grampsweb_celery container determined I could connect on port 25 but not 143. Changed that but ran into an error attempting to change password: "IndexError: "
grampsweb_celery | [2024-02-01 19:00:24,985: INFO/MainProcess] Task gramps_webapi.api.tasks.send_email_reset_password[dbfba699-9829-476d-8f38-cf55631db7c0] received
grampsweb_celery | [2024-02-01 19:00:25,402: ERROR/ForkPoolWorker-1] Task gramps_webapi.api.tasks.send_email_reset_password[dbfba699-9829-476d-8f38-cf55631db7c0] raised unexpected: IndexError(‘list index out of range’)
grampsweb_celery | Traceback (most recent call last):
grampsweb_celery | File "/usr/local/lib/python3.11/dist-packages/celery/app/trace.py", line 477, in trace_task
grampsweb_celery | R = retval = fun(*args, **kwargs)
grampsweb_celery | ^^^^^^^^^^^^^^^^^^^^
grampsweb_celery | File "/usr/local/lib/python3.11/dist-packages/gramps_webapi/util/celery.py", line 20, in __call__
grampsweb_celery | return self.run(*args, **kwargs)
grampsweb_celery | ^^^^^^^^^^^^^^^^^^^^^^^^^
grampsweb_celery | File "/usr/local/lib/python3.11/dist-packages/gramps_webapi/api/tasks.py", line 68, in send_email_reset_password
grampsweb_celery | send_email(subject=subject, body=body, to=[email])
grampsweb_celery | File "/usr/local/lib/python3.11/dist-packages/gramps_webapi/api/util.py", line 408, in send_email
grampsweb_celery | smtp.send_message(msg)
grampsweb_celery | File "/usr/lib/python3.11/smtplib.py", line 956, in send_message
grampsweb_celery | from_addr = email.utils.getaddresses([from_addr])[0][1]
grampsweb_celery | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
grampsweb_celery | IndexError: list index out of range
Because . . . it appears “docker-control down”, followed by “docker-control up -d” is required to accomplish the changes. Using “docker control blah” does not seem to do it, despite what I took to be claims the docker client would accomplish that.