Skip to content

Instantly share code, notes, and snippets.

@JRegimbal
Last active July 21, 2020 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JRegimbal/2f53c8834c0f8e6b63c85099018600a3 to your computer and use it in GitHub Desktop.
Save JRegimbal/2f53c8834c0f8e6b63c85099018600a3 to your computer and use it in GitHub Desktop.
Set up certbot in nginx docker

Staging.yml configuration

Set TLS to 0 and set SERVER_HOST to the correct domain for the API.

Bring up Rodan. This will start a HTTP-only environment.

Getting the certificate

Run the following from the nginx container: certbot certonly --webroot -w /var/www/letsencrypt -d SERVER_HOST

Applying the certificate

After the certificate has been given, it will be in a volume. Bring down the container for nginx and change TLS to 1 before bringing it back up.

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