-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Yandex-Practicum/add-docker-cache
feat: Optimize CI workflow and Docker configuration - Added Docker Buildx setup using `docker/setup-buildx-action@v3` in the CI workflow. - Introduced Docker containers build step with `docker/bake-action@v3` for improved build performance. - Enhanced backend and frontend test steps to ensure proper execution. - Added cleanup step to properly shutdown Docker Compose services. - Optimized layer caching in `Dockerfile.backend` and `Dockerfile.frontend` by copying `package.json` and `package-lock.json` before running `npm install`. - Changed exposed ports in both Dockerfiles from 5000 to 3000. - Added `docker-bake.hcl` for defining build targets and cache configuration to utilize GitHub Actions cache. These changes improve build efficiency, resource management, and maintainability of the CI process and Docker configurations.
- Loading branch information
Showing
4 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
target "backend" { | ||
cache-to = [ | ||
"type=gha,ignore-error=true,mode=max,scope=backend" | ||
] | ||
cache-from = [ | ||
"type=gha,scope=backend" | ||
] | ||
} | ||
target "frontend" { | ||
cache-to = [ | ||
"type=gha,ignore-error=true,mode=max,scope=frontend" | ||
] | ||
cache-from = [ | ||
"type=gha,scope=frontend" | ||
] | ||
} |