Closed bramski closed 3 years ago
@bramski could you show your MJML_*
django settings?
MJML_BACKEND_MODE = env('MJML_BACKEND_MODE', default='cmd')
MJML_TCP_SERVERS = [
('127.0.0.1', 28102),
]
In the case of our CI environment MJML_BACKEND_MODE
becomes tcpserver
.
try to use mjml
instead of 127.0.0.1
in your django settings
Hmmm, all the other configured servers for CI use localhost as the hostname. I wasn't aware of the bitbucket docker container setting up local domain names but I'll give it a shot.
i.e. REDIS_CACHE_URL="redis://localhost:6379/zo-enterprise-test"
is how I have redis configured for CI on bitbucket pipelines.
and also try to use the default port settings of mjml-tcpserver
:
mjml:
image: liminspace/mjml-tcpserver:0.10.2
and
MJML_TCP_SERVERS = [
('mjml', 28101),
]
note that when you run CI in your configuration case it can use global ports to run services and if you run them more than one or one of them wasn't stopped correctly, you can have an issue with conflicts. just add docker-compose logs
in your CI script to see output and to be sure that all services were started before you run your target scripts.
Yeah this is coming up for me in the wild as well on our dev & staging systems.
This is still not working. I had to change to command mode in CI which is far slower. Please reopen.
On Fri., Jan. 1, 2021, 9:27 a.m. Igor Melnyk, notifications@github.com wrote:
Closed #119 https://github.com/liminspace/django-mjml/issues/119.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/liminspace/django-mjml/issues/119#event-4161106029, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADG7FMMODMR6WBLHQ7XGDTSXYAYHANCNFSM4USJKKBA .
provide all info to reproduce the issue locally and after that I'll try to fix that. currently I don't see any problem neither python library nor docker image. they are working on various projects quite stable and well (including gitlab-ci to run functional and unit tests)
Please leave it open I will be able to deal with this after holidays thanks.
On Fri., Jan. 1, 2021, 10:41 a.m. Igor Melnyk, notifications@github.com wrote:
provide all info to reproduce the issue locally and after that I'll try to fix that. currently I don't see any problem neither python library nor docker image. they are working on various projects quite stable and well (including gitlab-ci to run functional and unit tests)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/liminspace/django-mjml/issues/119#issuecomment-753363652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADG7FP5G5PCVR6DQLXNUITSXYJOTANCNFSM4USJKKBA .
Had a chance to investigate this further. There seem to be some bugs in bitbucket's docker work. I changed to port 28101 and then updated the definition for the MJML docker container to be much more plain:
mjml:
image: liminspace/mjml-tcpserver:0.10.2
That managed to make the ports work correctly. Not sure why "expose" and "ports" were causing this to fail so randomly.
I'm having some issues getting our CI builds to pass using MJML-django in TCP mode as the renderer. It was working and then quite consistently when we started rendering more emails they started failing:
I'm a bit baffled by the error. It appears that there are working servers but the compilation step is failing immediately.
Bitbucket YAML looks as follows for docker config: