siwe-oidc
siwe-oidc copied to clipboard
The sample docker-compose.yml requires user to add siwe-oidc entry in their /etc/hosts
Is there a way to not having to manually edit /etc/hosts in https://github.com/spruceid/siwe-oidc/blob/ec8cc8ed5e6193438d4ac1dc9894653017aa6947/test/docker-compose.yml#L10 ? I often do docker compose down
, which resets the IP address. Having to edit this manually every time slows down my debug workflow. Also, I am on NixOS, so /etc/hosts is a symlink to a /nix/store and is editable only by nixos-rebuild
or similar commands
I have tried various options, such as
- Specifying
127.0.0.1
as the address. This failed with "couldn't connect to server" - Specifying
127.0.0.1
as the address, with network_mode: "host". This failed with siwe-oidc not being able to access the Redis container. - Automatically fetch the container IP address via
sudo docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$siwe_container_name"
and changeSIWEOIDC_BASE_URL
to reflect this URL, but this caused the siwe-oidc container to constantly restart. -
host.docker.internal
(https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach) doesn't work because that address is only for use within the container, not from the host.