Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New config isnt copied on container restart #49

Open
defcon84 opened this issue Feb 16, 2021 · 0 comments
Open

New config isnt copied on container restart #49

defcon84 opened this issue Feb 16, 2021 · 0 comments

Comments

@defcon84
Copy link

Everytime i update the linked keepalived config on the host, i need to stop and remove the container, then create it again.
A container restart, recreate or edit(re-deploy through Portainer) does not copy the changed config file to the local folder.

I now do this:

sudo docker container stop keepalived
sudo docker container rm keepalived
sudo docker-compose up -d

And to test if the new config is loaded
sudo docker exec keepalived cat /usr/local/etc/keepalived/keepalived.conf

It should copy and use the new config file on every (re)start.

I use the following docker-compose config:

  keepalived:
    container_name: keepalived
    image: osixia/keepalived:2.0.20
    network_mode: host
    pid: host
    volumes:
      - /srv/docker/keepalived/keepalived.conf:/container/service/keepalived/assets/keepalived.conf
    restart: always
    cap_add:
      - NET_ADMIN
      - NET_BROADCAST
      - NET_RAW
    command: [--copy-service, --loglevel, debug]
    environment:
      KEEPALIVED_COMMAND_LINE_ARGUMENTS: >-
        --log-detail
        --log-console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant