-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit f47d3e8
authored
fix: docker compose deployment script (#4445)
## Summary
This PR enhances the validator deployment script to provide better
support for external validators and improves configuration flexibility
for Docker image management.
## Changes
### 🔐 Security & Validation Improvements
- **Added mandatory email parameter**: Email is now a required argument
(not hardcoded to `[email protected]`)
- **Enhanced email validation**: Added regex validation for email format
- **Warning for Linera domain emails**: Warns external validators if
they use @linera.io or @linera.dev emails
- **Improved genesis file validation**: When using `--skip-genesis`, the
script now validates that the genesis.json file exists, is not empty,
and contains valid JSON
### 🐳 Docker Image Configuration
- **Added `--custom-tag` option**: Allows specifying custom image tags
for testing (without the `_release` suffix)
- **Flexible image configuration**: New environment variables for
granular control:
- `DOCKER_REGISTRY`: Override the Docker registry
- `IMAGE_NAME`: Override the image name
- `IMAGE_TAG`: Override the image tag
- `LINERA_IMAGE`: Override the complete image path
- **Better image path construction**: The script now intelligently
constructs the image path from components or uses a fully specified path
### 📦 Genesis Configuration Management
- **Configurable genesis bucket**: New `GENESIS_BUCKET` environment
variable (defaults to GCP public bucket)
- **Path prefix support**: `GENESIS_PATH_PREFIX` allows organizing
genesis files in subdirectories
- **Improved error messages**: Clear instructions when genesis file is
missing with `--skip-genesis`
### 🎨 Code Quality & UX Improvements
- **Consistent formatting**: Fixed indentation to use tabs throughout
the script
- **Enhanced documentation**: Updated usage examples showing all new
features
- **Better error messages**: More descriptive errors with clear fix
instructions
- **Deployment info tracking**: Extended `.deployment-info` file to
include email, custom tag, and genesis configuration details
- **External validator guidance**: Added important next steps section
for external validators after successful deployment
### 📝 Documentation Updates
- Updated all examples to include the required email parameter
- Added examples for all new configuration options
- Clarified environment variable descriptions
- Added comprehensive examples for different deployment scenarios
## Test plan
- [x] Test deployment with local build
- [x] Test deployment with remote image using default tag
- [x] Test deployment with custom tag using `--custom-tag`
- [x] Test email validation (valid and invalid formats)
- [x] Test genesis file validation with `--skip-genesis`
- [x] Test custom Docker registry and image name configuration
- [x] Verify deployment info file contains all new fields
🤖 Generated with [Claude Code](https://claude.ai/code)1 parent fec6a17 commit f47d3e8Copy full SHA for f47d3e8
File tree
Expand file treeCollapse file tree
1 file changed
+629
-463
lines changedOpen diff view settings
Filter options
- scripts
Expand file treeCollapse file tree
1 file changed
+629
-463
lines changedOpen diff view settings
0 commit comments