Automate certbot setup on deploy
BrunoBernardino opened this issue · comments
Bruno Bernardino commented
This should execute after #1, but it doesn't need to be worked on after (that issue would just need to make sure to run that code before certbot
, as it will inject code).
With a couple of variables for the make deploy
command (like DOMAIN=example.com EMAIL=user@example.com make deploy
) I should be able to run certbot
automatically, in the server, adding something like this to postinstall.sh
(the variables would need to be injected somehow):
certbot --nginx -n -d $DOMAIN -d www.$DOMAIN --agree-tos --email $EMAIL --redirect