Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ When a new version only includes updated container images (no compose or config
```bash
cd on-prem

# Pull latest images
# Update the image tag in your .env file
# Change DC_CURRENTS_IMAGE_TAG to the new version (e.g., 2026-01-26-001)

# Pull the new images
docker compose pull

# Restart with new images
docker compose up -d
```

> **Note:** The `DC_CURRENTS_IMAGE_TAG` in your `.env` file controls which version of Currents images are pulled. You must update this value to pull a new version. Run `./scripts/check-env.sh` to see if your tag differs from the current release.

### Updates with Compose File Changes

When the CHANGELOG indicates compose file changes:
Expand All @@ -37,6 +42,9 @@ docker compose down
# Pull latest repository changes
git pull

# Update DC_CURRENTS_IMAGE_TAG in your .env file to the new version
# Check VERSION file for the current release version: cat VERSION

# Regenerate your compose file (if using custom profile)
./scripts/generate-compose.sh <your-profile>

Expand All @@ -59,13 +67,18 @@ cd on-prem
# Pull latest repository changes
git pull

# Check for missing variables
# Check for missing variables and version discrepancies
./scripts/check-env.sh

# Add any missing variables to your .env file
# The script will show which variables are missing

# Then follow the appropriate upgrade steps above
# Update DC_CURRENTS_IMAGE_TAG in your .env file to the new version
# Check VERSION file for the current release version: cat VERSION

# Pull new images and restart
docker compose pull
docker compose up -d
```

## Version Checking
Expand Down
20 changes: 20 additions & 0 deletions on-prem/scripts/check-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ while IFS= read -r line || [ -n "$line" ]; do
fi
done < "$EXAMPLE_FILE"

# =============================================================================
# Check for version discrepancy
# =============================================================================
VERSION_FILE="$ON_PREM_DIR/VERSION"
if [ -f "$VERSION_FILE" ]; then
expected_version=$(cat "$VERSION_FILE" | tr -d '[:space:]')
if grep -q "^DC_CURRENTS_IMAGE_TAG=" "$ENV_FILE"; then
current_tag=$(grep "^DC_CURRENTS_IMAGE_TAG=" "$ENV_FILE" | cut -d'=' -f2 | tr -d '[:space:]')
if [ -n "$current_tag" ] && [ "$current_tag" != "$expected_version" ]; then
echo -e "${YELLOW}Note: Version discrepancy detected${NC}"
echo " Your .env has DC_CURRENTS_IMAGE_TAG=$current_tag"
echo " The VERSION file specifies: $expected_version"
echo ""
echo " To upgrade, update DC_CURRENTS_IMAGE_TAG in your .env file,"
echo " then run: docker compose pull && docker compose up -d"
echo ""
fi
fi
fi

# =============================================================================
# Check for corrupted values (e.g., line wrapping from terminal editors)
# =============================================================================
Expand Down