Hi everyone, I am using wiremock in docker, When i...
# general
w
Hi everyone, I am using wiremock in docker, When i change anything in stubs, changes don;t reflect instantly, rather it requires to restart the wiremock container.
Copy code
wiremock:
    container_name: 'app_wiremock'
    image: wiremock/wiremock
    ports:
      - "8080:8080"
    volumes:
      - ../stubs/:/home/wiremock/mappings
l
Hi, I don't think this is possible at the moment due to the stubs being read at the startup of the container
w
Nice, thank you.
c
I think you can hit
/__admin/reset
to re-load if that helps 🤷 (without a reboot, that is to say)
o
Does this work? Resetting? It is a different approach but you can keep your data at the project level and serialize your response based on this data. This way, you can change your data and response without a reboot. So for this, you need to use response transformer. But this is just an advice that comes to my mind, it is not an exact solution to your problem.
w
above solutions didn't work,
o
Did you keep your data out of the jar file and just update your data file withouting changing your source code?
c
This definitely works for me without rebooting the container. As Orçun says, make sure this is part of the mapped volume and not baked into the image in some way
👍 2
w
Copy code
curl -X POST <http://localhost:8080/__admin/mappings/reset>
making this request, it worked without restarting container. Thank you guyz for help!
👋 1
🙌 1
c
Awesome 🎉
❤️ 1