Introduction In this blog we will use nexus setup for NPM for a project which uses Ruby on rails. In this ruby on rails project we are using YARN and BUN framework. We did setup a nexus NPM proxy and private repo but yarn could not fetch the npm dependencies via the nexus proxy. The rails assets precompile task however uses bun which uses npm. YARN is a wrapper on the NPM hence it does not entirely rely on NPM. BUN is a runtime which performs all the NPM tasks. Our goal in this blog is to understand how to handle this scenario in a ruby on rails project when use NEXUS NPM proxy. Technical specifications We have below versions of the tools NEXUS : 3.37.1-01 NPM : 9.5.0 NODE : v18.15.0 NVM : 0.39.1 ( Node version manager ) Mac OS : Sonoma 14.2 YARN : 3.5.1 BUN : 1.0.0 Steps Below are the steps required Configure NPM proxy in NEXUS Configure NPM private hosted repo Configure NPM group in NEXUS Change local NPM config for registry Change the YARN config for registry Configure BUN co...
Introduction In this blog we will generate a PostgreSQL db backup of kong db which is running inside a docker container. We have a bash script which will be running on a host machine but it will execute the pg_dump command inside the docker container. All we need to ensure is we do not expose the password for the user we will be using to generate the db backup. Steps The high level steps are documented below: Create a backup_user for the db dump backup Create a .pgpass file for the backup_user Generate a db_dump using the pgpass file Create a backup_user Use below commands for the same Connect to kong docker container Use below command to connect to kong container, assuming the container name is 'kong' docker exec -it kong /bin/bash Login to PostgreSQL db as admin user Use below command to connect to postgresql db as admin user for creating a new user for db export. psql -d kong -U admin Create new user Use the sql query below for the same. Define some strong password as men...