Docker deployment gets "Mixed content" error on installation page

I’m trying to deploy OJS to Render.com using Docker runtime. The installation page doesn’t load properly and it has lots of “Mixed Content” errors.

I’m using this one-line Dockerfile

FROM pkpofficial/ojs:lts-3_3

I’m supplying the SERVERNAME env variable with render-ojs-lts.onrender.com.

There’s no error in build & deployment log. Here’s the site https://render-ojs-lts.onrender.com/

Please see the screenshot below:

What did I miss? I am not aware there’s a deployment guide with docker. I’m happy to read any articles / forum thread.

Thanks in advance.

Additional info
I’m new to OJS codebase and PHP. However, I had years of experience as web developer. I found similar issues in this forum but it wasn’t clear if they’re using docker or not. Therefore, I’m writing a new post here.

Sorry for arriving late to this issue. Next time if you got any trouble with the docker images please mention me directly.

This is not a docker-exclusive issue as it usually happens when you are behind a reverse proxy. In short, it happens because OJS is not great managing the protocol (or the base_url) because different segments of code are using different libraries and strategics.

The issue is is reported and discussed here:
https://github.com/pkp/pkp-lib/issues/6851

But (as explained in the issue) you can make it work with the right settings.

Just be sure:

  • Make sure apache SetEnvIf X-Forwarded-Proto "https" HTTPS=on
  • Set your base_urls variables properly in your config.ini.php
  • If still fails… set force_ssl to On.

If you arrived to this or any other solution, please report back to let other know this works.

Cheers,
m.