Pihole behind swag: 502 Bad gateway

Hi,
trying to set pihole behind swag, but I get 502 Bad gateway when trying to access pihole.mydomain.com.

I get this line in swag/log/nginx/error.log:
2023/02/12 18:48:28 [error] 283#283: 862 pihole could not be resolved (2: Server failure), client: 192.168.1.1, server: pihole., request: “GET / HTTP/2.0”, host: “pihole.mydomain.com

My docker-compose: PrivateBin
My pihole.subdomain.conf: PrivateBin
My docker logs swag: PrivateBin

Docker logs pihole is a lot of this:

Stopping pihole-FTL
pihole-FTL: no process found
2023-02-12 18:55:08: network.c.369) can't bind to socket: 0.0.0.0:80: Address already in use
Stopping lighttpd
lighttpd: no process found

Is there something wrong with my swag setup or is this a pihole problem? I’m not fluent at all with this stuff, so any help would be appreciated.

502 means swag can’t reach the application. from the logs from your pihole, your pihole isn’t starting up, so that explains why swag can’t reach it