So I have a project I’m working on with some friends on Github. I want automatically restart/recreate (shoudn’t matter which of both) the container when someone pushs or merges on github. There for i use the portainer recreation webhook, which automatically deletes, pulls the image and recreates the container. The problem is, that the static ip i gave the container on creation is not adopted to the new container (normaly it should, there also exists an issue on their github project, which describes my problem). The only workaround i found is downgrading. I need the static ip for a nginx reverse proxy, which also runs in a container, connected to the same network. Do you know of any alternatives to the portainer recreation webhook, as a restart of the container would be suffice? Or how to handle shuffling ips in a nginx container?

  • ProgramPhoenix@programming.devOPM
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Update: i solved the problem by using hostnames, inside the nginx container you can use the name of the other container as hostname and it will be resolved automatically