Resolved: Fix SSL renewal issue on Gitlab Server

PROBLEM : I had hosted a gitlab server on Azure and it was not getting autorenewed. SOLUTION :  1. Check the current SSL cert path: sudo grep -n "ssl_certificate" /var/opt/gitlab/nginx/conf/gitlab-http.conf OR sudo grep -n "ssl_certificate" /etc/gitlab/gitlab.rb  You are likely to see something like this: nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.example.com.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.example.com.key"  2. In my case, I was using gitlab let'sencrypt. So, I installed certbot. sudo apt update && sudo apt install certbot -y  3. Obtain Fresh Certificate sudo gitlab-ctl stop nginx sudo certbot certonly --standalone -d gitlab.yourdomain.com sudo gitlab-ctl start nginx 4. Configure Gitlab to use new cert external_url "https://gitlab.yourdomain.com" letsencrypt['enable'] = false nginx['s...

How to configure nvm on mac to run multiple node versions?

Recently, I had to work on multiple angular apps, one of which is running using angular 10 and other using angular 16.

Hence, I needed different versions of node. After doing somewhat research, I found that the steps are deterministic and are easy to follow.

In this blog, I am going to share the steps on how to configure nvm on mac. Here are the steps:

  1. Uninstall any existing version of node
    1. brew uninstall --ignore-dependencies node
    2. brew uninstall --force node 
  2. Install nvm using brew
    1. brew install nvm
  3. Export nvm directory:
    export NVM_DIR="$HOME/.nvm"
  4. Add nvm to shell:
    Add nvm to your shell profile: To make nvm available every time you open a new terminal window, you will need to add the following line to your shell profile (e.g., ~/.bash_profile or ~/.zshrc):
    source $(brew --prefix nvm)/nvm.sh
  5. Verify by running nvm --version
  6. Yay! nvm is configured.
  7. To install a specific version:
    nvm install <version>
    e.g. nvm install 18.17.0
  8. To switch to a specific version:
    nvm use 18.17.0
  9. To List available versions:
    nvm ls-remote
  10. To list local versions:
    nvm ls