anantadwi13/dns-server-manager

Api doesn't work

Closed this issue · 7 comments

In container
curl http://127.0.0.1:5555/zones
[]
curl http://localhost:5555/zones
[]

chrome
http://ip:5555/zones
[]

Bind works.

Hi @alfmannew,

Could you explain what the problem is? Which version did you use? Please, provide the steps to reproduce this problem.

Thank you.

Hi

I use docker-compose
latest image

  dns:
    image: "anantadwi13/dns-server-manager:latest"
    container_name: "dns"
    hostname: "dns"
    volumes:
      - /data/docker-data/dns/bind/zones:/etc/bind/zones
      - /data/docker-data/dns/bind/named.conf.local:/etc/bind/named.conf.local
      - /data/docker-data/dns/tmp:/data
    ports:
      - "5555:5555"
Container details
LABELS
org.opencontainers.image.description	Manage DNS Server (Bind9) via REST API
org.opencontainers.image.source	https://github.com/anantadwi13/dns-server-manager
org.opencontainers.image.title	dns-server-manager
org.opencontainers.image.url	https://github.com/anantadwi13/dns-server-manager
org.opencontainers.image.version	0.3.0

Bind works.

Docs - OK
http://ip:5555/docs#

Api doesn't work

Hi,
Can you give me more details on "Api doesn't work"? Is it about connection refused, internal server error, or anything else?

Btw, you don't need to mount any folders inside /etc/bind. You just need to mount /data to persist the container's data.

I mount my setting from another server (zones files and named.conf.local)

In container
curl http://127.0.0.1:5555/zones
[]
curl http://localhost:5555/zones
[]

chrome
http://ip:5555/zones
[]

# curl \
>  --header "Content-Type: application/json" \
>  --request GET \
>  "http://ip:5555/zones"
[]

api answer -->[]

I think I got it.
The api doesn't work with old data (my data).
It works only with new data received via api.

Unfortunately, it doesn't support restoring existing data.
Perhaps in the next version I will add this feature.

OK, thanks