Closed TitanFighter closed 4 years ago
Sad. :(
I'm one of the web.py (it's a micro and awesome Python web framework) maintainers, there's an issue with pypi and the latest release 0.50 is now unavailable, i have to release and publish 0.51 instead.
Will fix this soon.
hi @TitanFighter
Please git clone and build new image.
Check the commit message of last commit: https://github.com/iredmail/dockerized/commit/a71af6ba53a5b351fb5d3540452d036c786b47ca
There're some changes you need to pay attention:
iredmail.conf
.iredmail.conf
is moved to /etc/iredmail-docker.conf
./docker/entrypoints/default_settings.conf
.@iredmail I will check it, thanks.
I have a question regarding touch /etc/iredmail-docker.conf
and mkdir /opt/iredmail
. What is the purpose of this? This is an anti-pattern. iredmail-docker.conf
and folder for iremail components should live anywhere where user wants and as a result user must attach it to run ...
manually providing real path for file and folder. Or is it temporary?
EDIT
Tested. Result: No errors in terminal on start + Roundcube let me in :) Sending and notification about Delivery status notification
work. Receiving does not work (need to reconfigure DNS, but I will try to do it either tomorrow or after tomorrow).
EDIT 2
It would be sweet if you can change current approach for touch /etc/iredmail-docker.conf
and mkdir /opt/iredmail
in the next few days as I describe above and push it to docker hub (even for private use temporary). In this case a) it could be labeled probably as a "beta" and b) I can test it in a real semi-prod environment together with Lets encrypt.
I have a question regarding
touch /etc/iredmail-docker.conf
andmkdir /opt/iredmail
. What is the purpose of this? This is an anti-pattern.iredmail-docker.conf
and folder for iremail components should live anywhere where user wants and as a result user must attach it torun ...
manually providing real path for file and folder. Or is it temporary?
/opt/iredmail/
and /etc/iredmail-docker.conf
is to have a consistent setup for all docker users. When some sysadmin has an issue, instead of telling him/her to check file iredmail-docker.conf
somewhere on his/her server (you know, different users store it in different folders), we can tell him/her to check file /etc/iredmail-docker.conf
directly. And for sysadmins, he/she just needs to remember one path. This will reduce much work for troubleshooting./opt/iredmail/
should be configurable in /etc/iredmail-docker.conf
with a variable, i will try to improve it later. But again, same purpose of above one, for easier troubleshooting and consistent. It's ok to link other directory to /opt/iredmail/
.I reopen this issue for further discussion. Or, feel free to create a new issue.
Technically, you can use any other env file instead of /etc/iredmail-docker.conf
with --env-file /path/to/another/iredmail-docker.conf
argument while running docker.
For all-in-one container, i suppose this is ok. but what about setup with docker-compose or K8S (split components to different pods)?
I can test it in a real semi-prod environment together with Lets encrypt.
It's not recommended to try it in semi-prod or prod server now, something may be changed before final stable release.
Image published on Docker Hub: https://hub.docker.com/r/iredmail/mariadb
The purpose of /opt/iredmail/ and /etc/iredmail-docker.conf is to have a consistent setup for all docker users. When some sysadmin has an issue, instead of telling him/her to check file iredmail-docker.conf somewhere on his/her server (you know, different users store it in different folders), we can tell him/her to check file /etc/iredmail-docker.conf directly. And for sysadmins, he/she just needs to remember one path. This will reduce much work for troubleshooting.
Let me try to re-explain with real example how users/admins use Docker. On my laptop (dev environment) I have the next structure of folders:
~/www/
project1.com/
frontend/
Dockerfiles/
Dockerfile
docker-compose.yml
backend/
Dockerfiles/
Dockerfile
docker-compose.yml
iredmail/
Dockerfiles/
Dockerfile
docker-compose.yml
mounted_volumes/
project2.com/
/src/
Dockerfiles/
Dockerfile
docker-compose.yml
project_script_1.py
project_script_2.py
project_script_X.py
iredmail/ # <--- Everything in one place
Dockerfiles/
Dockerfile
docker-compose-dev.yml
docker-compose-prod.yml
iredmail-docker-dev.conf # <--- Different configs within project's folder
iredmail-docker-prod.conf # <--- Different configs within project's folder
mounted_volumes/
On servers (prod environment) I have the next structure:
/var/www/
project1.com/
....
project2.com/
....
So, as you can see in both cases each project has its own folder where I can find everything related to these projects, including Docker Files (Dockerfile, different versions of docker-compose.yml, different configs) and Docker Volumes, so in this case everything in one place and in case if I need, I can simply scp just one folder (with configs and mounted_volumes) for example from one server to another and everything will work in a minutes without extra actions. This is an advantage of Docker and it is anti-pattern to store anything outside projects folder (exception is possible, but only if it is really necessary). So I propose to remove info about /etc/iredmail-docker.conf
and leave just --env-file /path/to/another/iredmail-docker.conf
example. This is not your issue as a developer, where config and volumes should live, this is an issue of users/admins - this is how Docker supposed to work.
/opt/iredmail/ should be configurable in /etc/iredmail-docker.conf with a variable, i will try to improve it later. But again, same purpose of above one, for easier troubleshooting and consistent. It's ok to link other directory to /opt/iredmail/.
/opt/iredmail/ should be configurable in /etc/iredmail-docker.conf
-> are you talking about
DOCKER_VOLUME_BASEDIR
, if yes, than users can configure paths like:
DOCKER_VOLUME_BASEDIR=/var/www/project2.com/iredmail/mounted_volumes
DOCKER_VOLUME_CUSTOM_CONF_DIR=/var/www/project2.com/iredmail/mounted_volumes/custom
DOCKER_VOLUME_SSL_DIR=/var/www/project2.com/iredmail/mounted_volumes/ssl
...
and this absolutely ok -> everything can be kept in one folder (/var/www/project2.com/iredmail/mounted_volumes/xyz) otherwise user has flexibility to mount everything as he/she needs.
It's not recommended to try it in semi-prod or prod server now, something may be changed before final stable release.
I will be able to replace old version by new versions easily.
Image published on Docker Hub: https://hub.docker.com/r/iredmail/mariadb
Thanks
For all-in-one container, i suppose this is ok. but what about setup with docker-compose or K8S (split components to different pods)?
In order to share volumes between containers and at the same time to mount volumes to host (to make them as a persistent volumes), one of possible solution can be this one and a simple example. Additionally in case of docker-compose, user's docker-compose.yml
replaces iredmail-docker.conf
.
P.S. Found typo reuired
Thanks for sharing.
--env-file
, I updated README.md
to replace hard-coded paths by relative paths, it should be ok now. No more hard-coded /etc/iredmail-docker.conf
and /opt/iredmail
(although it's still used as an example, but we clearly mention it's just an example and feel free to use any directory you prefer).DOCKER_VOLUME_*
will be removed later.Updated README.md
again, should be clearer now.
Issue closed since all issues mentioned here have been solved. :)
Thanks. Much cooler :)
Just one tip: docker pull iredmail/mariadb:nightly
is not required, so can be removed in README.
When you docker run ... iredmail/mariadb:nightly
it will automatically download the image (if has not been downloaded previously).
Good catch. Updated. :)
Hi @iredmail
Testing the latest version and there is an error: