File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -352,10 +352,10 @@ cli:node:e2e:dind:
352352 docker images | grep "$CI_REGISTRY_IMAGE"
353353 # Create .env file with registry and tag
354354 - |
355- cat > .env << EOF
356- PGAI_REGISTRY=$CI_REGISTRY_IMAGE
357- PGAI_TAG=$PGAI_TAG
358- EOF
355+ cat > .env <<EOF
356+ PGAI_REGISTRY=$CI_REGISTRY_IMAGE
357+ PGAI_TAG=$PGAI_TAG
358+ EOF
359359 script :
360360 - ./tests/e2e.cli.sh
361361 after_script :
@@ -396,10 +396,10 @@ cli:node:full:dind:
396396 docker images | grep "$CI_REGISTRY_IMAGE"
397397 # Create .env file with registry and tag
398398 - |
399- cat > .env << EOF
400- PGAI_REGISTRY=$CI_REGISTRY_IMAGE
401- PGAI_TAG=$PGAI_TAG
402- EOF
399+ cat > .env <<EOF
400+ PGAI_REGISTRY=$CI_REGISTRY_IMAGE
401+ PGAI_TAG=$PGAI_TAG
402+ EOF
403403 script :
404404 - echo "=== Testing local-install (demo mode) ==="
405405 - node ./cli/dist/bin/postgres-ai.js mon local-install --demo
Original file line number Diff line number Diff line change @@ -1187,11 +1187,16 @@ mon
11871187 const envFile = path . resolve ( projectDir , ".env" ) ;
11881188 const imageTag = opts . tag || pkg . version ;
11891189
1190- // Build .env content
1190+ // Build .env content, preserving important existing values
11911191 const envLines : string [ ] = [ `PGAI_TAG=${ imageTag } ` ] ;
1192- // Preserve GF_SECURITY_ADMIN_PASSWORD if it exists
11931192 if ( fs . existsSync ( envFile ) ) {
11941193 const existingEnv = fs . readFileSync ( envFile , "utf8" ) ;
1194+ // Preserve PGAI_REGISTRY if it exists (for CI/custom registry usage)
1195+ const registryMatch = existingEnv . match ( / ^ P G A I _ R E G I S T R Y = ( .+ ) $ / m) ;
1196+ if ( registryMatch ) {
1197+ envLines . push ( `PGAI_REGISTRY=${ registryMatch [ 1 ] . trim ( ) } ` ) ;
1198+ }
1199+ // Preserve GF_SECURITY_ADMIN_PASSWORD if it exists
11951200 const pwdMatch = existingEnv . match ( / ^ G F _ S E C U R I T Y _ A D M I N _ P A S S W O R D = ( .+ ) $ / m) ;
11961201 if ( pwdMatch ) {
11971202 envLines . push ( `GF_SECURITY_ADMIN_PASSWORD=${ pwdMatch [ 1 ] } ` ) ;
Original file line number Diff line number Diff line change @@ -179,7 +179,8 @@ Method 2: Manual configuration (avoids credentials in state):
179179ssh ubuntu@your-ip
180180cd /home/postgres_ai/postgres_ai
181181sudo -u postgres_ai vim instances.yml
182- sudo -u postgres_ai postgresai mon update-config
182+ sudo -u postgres_ai docker-compose run --rm sources-generator
183+ sudo -u postgres_ai docker-compose restart pgwatch-postgres pgwatch-prometheus
183184```
184185
185186### Backup
You can’t perform that action at this time.
0 commit comments