fix(docker): correct build errors, dead code and missing config#28
Closed
luiscruzcwb wants to merge 1 commit into
Closed
fix(docker): correct build errors, dead code and missing config#28luiscruzcwb wants to merge 1 commit into
luiscruzcwb wants to merge 1 commit into
Conversation
- Dockerfile: remove COPY of postcss.config.js and tailwind.config.js (Tailwind v4 uses @tailwindcss/vite plugin, no config files needed) - Remove dead .docker/nginx/ directory (9 files never copied into the image, relied on dockerize which is not installed) - add-env-vars.sh: fix env prefix REACT_APP_ -> VITE_ (Vite project); remove _writeNginxEnvVars which depended on missing dockerize binary - docker-compose.yml: drop deprecated version field, remove NODE_ENV=production (irrelevant in nginx:alpine stage), add healthcheck using existing /health endpoint - docker_build.sh: fix registry atendai/ -> evolutionfoundation/, add buildx multi-platform (linux/amd64,linux/arm64), set -e and require VERSION argument to prevent accidental untagged pushes - .dockerignore: add to exclude node_modules/, .git/ and build artifacts from Docker build context
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates Docker-related tooling and configuration to align with a Vite/Tailwind v4 frontend, fix broken builds, remove unused nginx/dead code, and improve image build/publish behavior and compose health checks. Sequence diagram for new docker-compose healthcheck using /health endpointsequenceDiagram
participant Docker
participant Container
participant App
Docker->>Container: healthcheck CMD wget -q --spider http://localhost/health
Container->>App: GET /health
App-->>Container: 200 OK
Container-->>Docker: health status healthy
Flow diagram for updated docker_build.sh multi-platform image build and pushflowchart TD
A[docker_build.sh] --> B[set -e]
B --> C{VERSION arg provided?}
C -- no --> D[exit with usage]
C -- yes --> E[set IMAGE=evolutionfoundation/evolution-manager-v2]
E --> F[docker buildx build --platform linux/amd64,linux/arm64]
F --> G[--tag IMAGE:VERSION]
G --> H[--tag IMAGE:latest]
H --> I[--push]
I --> J[image pushed to registry]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Summary
COPYofpostcss.config.jsandtailwind.config.js— Tailwind v4 uses the@tailwindcss/viteplugin, these files don't exist and breakdocker build.docker/nginx/directory (9 files) — never copied into the image, referenceddockerizewhich is not installedadd-env-vars.sh: fix env prefixREACT_APP_→VITE_(this is a Vite project); remove_writeNginxEnvVarswhich depended on the missingdockerizebinarydocker-compose.yml: drop deprecatedversion:field, removeNODE_ENV=production(irrelevant in thenginx:alpinefinal stage), addhealthcheckusing the existing/healthendpointdocker_build.sh: fix registryatendai/→evolutionfoundation/, add buildx multi-platform (linux/amd64,linux/arm64), guard missingVERSIONargument withset -e.dockerignore: add to excludenode_modules/,.git/and build artifacts from Docker build context — reduces build context size significantlyTest plan
docker build .completes without errorsdocker compose upstarts the container with healthy statusdocker_build.sh <version>pushes toevolutionfoundation/registry for both platformsSummary by Sourcery
Fix Docker build and compose configuration for the Vite-based frontend and clean up unused Docker-related assets.
Bug Fixes:
Enhancements: