Skip to content

feat: manage nginx in another docker container #977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 21, 2025
Merged

Conversation

0xJacky
Copy link
Owner

@0xJacky 0xJacky commented Apr 20, 2025

Close #234
Close #802
Close #856

  • Control the nginx in another container via the Go Docker client
  • If using Docker container, during OTA process, replace the container instead of the binary.
  • Update documentation about this feature.

@0xJacky 0xJacky changed the title feat: docker ui only feat: manage nginx in another docker container Apr 20, 2025
@0xJacky 0xJacky requested a review from Copilot April 21, 2025 06:42
@0xJacky 0xJacky marked this pull request as ready for review April 21, 2025 06:42
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the feature to manage nginx in a separate Docker container by enhancing error handling, updating API endpoints, and improving configuration file detection in the code editor. Key changes include:

  • Adding new error codes and error handling for nginx and Docker operations.
  • Enhancing the CodeEditor to properly detect configuration files and skip AI suggestions when content is sensitive.
  • Updating Docker Compose to include additional services for managing nginx in a separated container environment.

Reviewed Changes

Copilot reviewed 39 out of 51 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/src/constants/errors/nginx.ts Added error code for nginx reload failures
app/src/constants/errors/docker.ts Added Docker-specific error messages
app/src/components/CodeEditor/CodeCompletion.ts Introduced configuration file detection and sensitive content checks
api/nginx/status.go Enhanced error handling for nginx reload
api/nginx/router.go Renamed test endpoint for clarity
api/nginx/control.go Updated test and reload functions with additional error checking
api/config/add.go Improved error handling for nginx reload
.devcontainer/docker-compose.yml Added new service definitions for the additional nginx container
Files not reviewed (12)
  • .devcontainer/init-nginx.sh: Language not supported
  • .devcontainer/start.sh: Language not supported
  • app/src/language/ar/app.po: Language not supported
  • app/src/language/de_DE/app.po: Language not supported
  • app/src/language/en/app.po: Language not supported
  • app/src/language/es/app.po: Language not supported
  • app/src/language/fr_FR/app.po: Language not supported
  • app/src/language/ko_KR/app.po: Language not supported
  • app/src/language/messages.pot: Language not supported
  • app/src/language/ru_RU/app.po: Language not supported
  • app/src/language/tr_TR/app.po: Language not supported
  • app/src/language/uk_UA/app.po: Language not supported
Comments suppressed due to low confidence (2)

.devcontainer/docker-compose.yml:29

  • Both the 'nginx-ui-3' and subsequent 'nginx' services use the image 'nginx-ui-dev'. Verify whether using the same image in both cases is intentional or if distinct images should be applied for different roles.
nginx-ui-3:

app/src/components/CodeEditor/CodeCompletion.ts:228

  • The init function now requires a filename parameter for proper configuration file detection. Ensure all callers provide the correct filename to leverage this functionality.
async function init(editor: Editor, filename: string = '') {

@0xJacky 0xJacky merged commit ea90da4 into dev Apr 21, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for RTMP streaming How I can install nginxUi by modsecurity ? Docker container only for UI
1 participant