@@ -19,9 +19,14 @@ Remove cached resources to avoid conflicts when redeploying:
1919# Stop and remove existing containers
2020docker compose down
2121
22- # Inspect and remove Nexent images
23- docker images | grep nexent
24- docker images | grep nexent | awk ' {print $3}' | xargs docker rmi -f
22+ # Inspect Nexent images
23+ docker images --filter " reference=nexent/*"
24+
25+ # Remove Nexent images
26+ # Windows PowerShell:
27+ docker images -q --filter " reference=nexent/*" | ForEach-Object { docker rmi -f $_ }
28+ # Linux/WSL:
29+ docker images -q --filter " reference=nexent/*" | xargs -r docker rmi -f
2530
2631# (Optional) prune unused images and caches
2732docker system prune -af
@@ -92,23 +97,34 @@ Run the SQL scripts shipped with each release to keep your schema up to date.
92973. Execute SQL files sequentially (host machine example):
9398
9499 ` ` ` bash
95- docker exec -i nexent-postgresql psql -U $POSTGRES_USER -d $POSTGRES_DB < ./sql/2025-10-30-update.sql
96- docker exec -i nexent-postgresql psql -U $POSTGRES_USER -d $POSTGRES_DB < ./sql/2025-11-05-update.sql
100+ # Example: If today is November 6th and your last update was on October 20th,
101+ # and there are two new files 1030-update.sql and 1105-update.sql,
102+ # execute the following commands (please replace the placeholders with your actual values)
103+ docker exec -i nexent-postgresql psql -U {YOUR_POSTGRES_USER} -d {YOUR_POSTGRES_DB} < ./sql/1030-update.sql
104+ docker exec -i nexent-postgresql psql -U {YOUR_POSTGRES_USER} -d {YOUR_POSTGRES_DB} < ./sql/1105-update.sql
97105 ` ` `
98106
99- Replace the filenames with the migrations released after your last deployment.
107+ Execute the scripts in chronological order based on your deployment date .
100108
101109> 💡 Tips
102110> - Load environment variables first if they are defined in ` .env` :
103111>
112+ > ** Windows PowerShell:**
113+ > ` ` ` powershell
114+ > Get-Content .env | Where-Object { $_ -notmatch ' ^#' -and $_ -match ' =' } | ForEach-Object { $key , $value = $_ -split ' =' , 2; [Environment]::SetEnvironmentVariable($key .Trim(), $value.Trim (), ' Process' ) }
115+ > ` ` `
116+ >
117+ > ** Linux/WSL:**
104118> ` ` ` bash
105119> export $( grep -v ' ^#' .env | xargs)
120+ > # Or use set -a to automatically export all variables
121+ > set -a; source .env; set +a
106122> ` ` `
107123>
108124> - Create a backup before running migrations:
109125>
110126> ` ` ` bash
111- > docker exec -i nexent-postgres pg_dump -U $POSTGRES_USER $POSTGRES_DB > backup_$( date +%F) .sql
127+ > docker exec -i nexent-postgres pg_dump -U {YOUR_POSTGRES_USER} {YOUR_POSTGRES_DB} > backup_$( date +%F) .sql
112128> ` ` `
113129
114130---
0 commit comments