Flask routes in a docker container

Hi all, can anyone help with route issues in flask running in a docker container?

Im trying to axios to a route, but on the front end im recieving a 404 error.

(By front end I mean the html page in my flasks template folder, its a self contained application - so no CORS etc.)

The function:

axios.post("/api/samples_grid", {"dataset_id": dataset_id})
          .then(result => { console.log(result)})

The error:

spread.js:25 POST http://*server-ip*/flask/api/samples_grid 404 (NOT FOUND)

So I think whats happening is that ‘server-ip’, (ive named it this for the post, its an actual ip address) is looking at the ip address of my server and not the docker container which is called ‘flask’.

Im unsure of how to define the route though, should it be:

axios.post("<flask>/api/samples_grid", {"dataset_id": dataset_id})

Or something different?