Startup fails because nginx cannot start

Hi,

For some reason, I’m not able to run Libretime using docker-compose anymore. The nginx container fails on startup with the following error:

dev-nginx-1            | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
dev-nginx-1            | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
dev-nginx-1            | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
dev-nginx-1            | 10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
dev-nginx-1            | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
dev-nginx-1            | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
dev-nginx-1            | /docker-entrypoint.sh: Configuration complete; ready for start up
dev-nginx-1            | 2023/03/24 13:01:37 [emerg] 1#1: host not found in upstream "api" in /etc/nginx/conf.d/default.conf:61
dev-nginx-1            | nginx: [emerg] host not found in upstream "api" in /etc/nginx/conf.d/default.conf:61
dev-nginx-1 exited with code 1

I customised the nginx conf so the line number is different, but the line it’s referring to is this one. The error itself is pretty clear: it’s failing because the api service is unreachable. What I don’t understand is why this just started happening now. I don’t remember the order in which containers started up in the past, but it seems likely that nginx was generally up before the api was ready.

It’s not caused by a change I made, because I didn’t make any. I tried running an old version of the nginx image, but that didn’t help. The next step would be to get the container to wait before starting, perhaps using dockerize.

Before that though - has anyone else seen this?

Thanks
Oliver