Open victoria557 opened 3 days ago
I think 212.227.123.16:53
is the host's DNS resolver (as port 53 is for DNS resolution). It can't resolve host pwa
as it's no longer using Docker's internal DNS resolver.
If you don't really need network_mode: "host"
and your database instance is running on the host, you can use the docker IP address (something like 172.17.0.1
) as part of your database URL to the host from the docker network.
API Platform version(s) affected: 3.2
Description
I try to run api platform on production without database service on docker, because I want to use a local database. I start the project with the command provided in your docs, bu I run it with a specific compose.yaml and a compose.prod.yaml. I added to compose.prod.yaml file
network_mode: "host"
so I bring to the container the same networking as my host.But when I run the project, I get this error :
From what I understand, it doesn't find pwa host. I can't understand why.
How to reproduce
I run this command to starting api platform on production :
SERVER_NAME=preprod.website.fr APP_SECRET=a_secret_key CADDY_MERCURE_JWT_SECRET=ChangeThisMercureHubJWTSecretKey docker compose -f compose.yaml -f compose.prod.yaml up --wait
compose.yaml :
compose.prod.yaml :