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

Certificate service renewal #431

Open
oscgonfer opened this issue Jan 16, 2023 · 2 comments
Open

Certificate service renewal #431

oscgonfer opened this issue Jan 16, 2023 · 2 comments

Comments

@oscgonfer
Copy link

oscgonfer commented Jan 16, 2023

Describe the bug
There is an issue with the letsencrypt.service. The certificate renewal works fine, but not the restarting of the nginx container.

To Reproduce
Steps to reproduce the behavior:

  1. Setup fabmanager following setup script
  2. Choose to autorenew certificate
  3. Wait and check the status for the letsencrypt service or trigger it

Expected behavior
A renewal of the certificate (OK) and relaunching of the nginx (NOK)

Server
Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-124-generic x86_64)

docker --version
Docker version 20.10.17, build 100c701

I think it's simply a problem with the name of the container. At least in our deployment scenario, containers are named using dashes, instead of underscores:

[Unit]
Description=letsencrypt cert update oneshot
Requires=docker.service

[Service]
Type=oneshot
ExecStart=/usr/bin/docker run --rm --name certbot_fabmanager -v "/apps/fabmanager/letsencrypt/etc:/etc/letsencrypt" certbot/certbot:latest -c "/etc/letsencrypt/config/webroot.ini" certonly
ExecStartPost=-/usr/bin/docker restart fabmanager_nginx_1

In our case should replace the ExecStartPost line by (note also the dash before /usr/bin ?):

ExecStartPost=/usr/bin/docker restart fabmanager-nginx-1
@sylvainbx sylvainbx added the bug label Feb 20, 2023
@sylvainbx
Copy link
Member

I made a test but cannot reproduce the issue. Can you please report here your version of docker-compose ?

@oscgonfer
Copy link
Author

Here it is:

~# docker compose version
Docker Compose version v2.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants