feat: add Docker support and configuration files#55
Open
cg8-5712 wants to merge 7 commits intovnt-dev:v2from
Open
feat: add Docker support and configuration files#55cg8-5712 wants to merge 7 commits intovnt-dev:v2from
cg8-5712 wants to merge 7 commits intovnt-dev:v2from
Conversation
- Introduce Dockerfile for building the vnts2 application - Add .dockerignore to exclude unnecessary files from Docker context - Create docker-compose.yml for easy deployment - Update README with Docker usage instructions - Add example configuration file for user reference This commit establishes a Docker-based environment for the vnts2 server, enabling easier deployment and management. It includes necessary configurations for networking and persistence, ensuring a smooth setup process.
There was a problem hiding this comment.
Pull request overview
Adds a Docker-based build/runtime setup for the vnts2 Rust server, along with example configuration and updated documentation to support containerized deployment and persisted state.
Changes:
- Introduces
Dockerfile,docker-compose.yml, and.dockerignoreto build and runvnts2with persisted/app/data. - Pins the Rust toolchain version via
rust-toolchain.tomland the Docker build arg. - Adds
config.example.tomland substantially expands README documentation (EN + ZH) for configuration and Docker usage.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
Dockerfile |
Multi-stage build producing a slim runtime image for vnts2. |
docker-compose.yml |
Compose service definition exposing required ports and mounting ./data for persistence. |
.dockerignore |
Reduces Docker build context by excluding repo metadata, build outputs, and runtime artifacts. |
rust-toolchain.toml |
Pins Rust toolchain version for consistent builds (incl. Docker). |
config.example.toml |
Provides a user-facing sample configuration file. |
README.md |
Replaces/expands documentation with configuration + Docker deployment instructions (EN). |
README.zh.md |
Adds full configuration + Docker deployment documentation (ZH). |
.gitignore |
Ignores runtime-generated files and persisted data/logs. |
data/.gitkeep |
Ensures data/ directory exists in the repo for mounting/persistence workflows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Introduce LoadedConfig struct to encapsulate config loading - Update load_from to load_with_meta for better error handling - Log warnings when using default credentials for web auth - Create default config if it does not exist This commit improves the configuration loading process by providing a structured way to handle default values and logging warnings when defaults are used. It ensures that users are informed about the configuration state and encourages them to set custom credentials.
- Introduce `network_secrets` to store secrets for each network code. - Implement validation for network secrets during registration. - Update configuration to include `network_secrets` and ensure strong secret generation. - Refactor network configuration handling to improve error reporting and validation. This change enhances security by requiring a secret for each network code, ensuring that only authorized networks can register. It also improves the configuration management by validating the presence and strength of secrets, preventing misconfigurations that could lead to security vulnerabilities.
- Update README files to reflect correct sample config path - Add 'secret' field to network structures and database - Modify network management functions to handle secrets - Enhance UI to allow input and display of network secrets This commit introduces a new feature for managing network secrets, which improves security by requiring a secret for each network. The documentation has been updated to guide users on the new configuration requirements. Additionally, the UI has been enhanced to support the input and display of network secrets, ensuring a better user experience.
- Adjust indentation and line breaks for better readability - Reorganize imports and function parameters for consistency - Ensure consistent use of method chaining and formatting These changes enhance the overall code quality and maintainability without altering any functionality. The refactoring focuses on improving the visual structure of the code, making it easier to navigate and understand.
- Create a new example configuration file for the application. - Define listener addresses for TCP, QUIC, and WebSocket protocols. - Include optional settings for allow-list, lease duration, and web admin UI. - Provide placeholders for SQLite persistence and bootstrap networks. This commit introduces a sample configuration file that helps users set up the application with default settings. It includes comments for guidance on modifying the configuration as needed.
Author
|
All features test pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit establishes a Docker-based environment for the vnts2 server, enabling easier deployment and management. It includes necessary configurations for networking and persistence, ensuring a smooth setup process.
Test passed.

Requring about 6mins, mainly depends on your hardware.