[NO MERGE] add global makefile and docker for services - #32
[NO MERGE] add global makefile and docker for services#32Kristian228007 wants to merge 2 commits into
Conversation
Review Summary by Qodo
WalkthroughsDescription• Reorganize Makefile with backend path abstraction for monorepo structure • Add frontend and backend service management commands to Makefile • Consolidate docker-compose at root level with frontend and backend services • Create frontend Dockerfile for containerized development environment • Simplify backend Dockerfile with corrected build context paths • Add help command documenting all available Makefile targets Diagramflowchart LR
A["Root Makefile"] -->|"abstracts paths"| B["Backend Path Variable"]
A -->|"manages services"| C["Docker Compose"]
A -->|"runs commands"| D["Backend Commands"]
A -->|"runs commands"| E["Frontend Commands"]
C -->|"builds"| F["Backend Container"]
C -->|"builds"| G["Frontend Container"]
C -->|"manages"| H["Database & Swagger"]
F -->|"uses"| I["Backend Dockerfile"]
G -->|"uses"| J["Frontend Dockerfile"]
File Changes1. Makefile
|
Code Review by Qodo
1. backend-build missing mkdir
|
| backend-build: | ||
| cd $(BACKEND_PATH) && go build -o bin/server cmd/server/main.go | ||
|
|
There was a problem hiding this comment.
1. Backend-build missing mkdir 🐞 Bug ⛯ Reliability
make backend-build outputs to backend/bin/server but the target never creates backend/bin (and it’s gitignored), so a fresh checkout will likely fail with a “no such file or directory” when writing the binary.
Agent Prompt
## Issue description
`backend-build` writes the binary to `backend/bin/server` but doesn’t ensure `backend/bin` exists. Because `backend/bin/` is gitignored, it won’t exist on a clean checkout and the build can fail.
## Issue Context
- `backend-build` is intended as a convenient top-level build target.
- `bin-deps` already creates `$(LOCAL_BIN)` but `backend-build` does not depend on it.
## Fix Focus Areas
- Makefile[64-69]
- Makefile[97-99]
- .gitignore[29-36]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| migrations-up: | ||
| goose -dir ./migrations postgres "postgres://postgres:postgres@localhost:5442/seller_promotions?sslmode=disable" up | ||
| cd $(BACKEND_PATH) && goose -dir ./migrations postgres "postgres://postgres:postgres@localhost:5442/seller_promotions?sslmode=disable" up | ||
|
|
||
| migrations-down: | ||
| goose -dir ./migrations postgres "postgres://postgres:postgres@localhost:5442/seller_promotions?sslmode=disable" down | ||
| cd $(BACKEND_PATH) && goose -dir ./migrations postgres "postgres://postgres:postgres@localhost:5442/seller_promotions?sslmode=disable" down | ||
|
|
||
| migrations-new: | ||
| goose create -dir ./migrations rename sql | ||
| cd $(BACKEND_PATH) && goose create -dir ./migrations rename sql |
There was a problem hiding this comment.
2. Migrations not self-contained 🐞 Bug ⛯ Reliability
The Makefile exposes migrations-* targets that directly call goose, but they don’t depend on bin-deps, and bin-deps installs goose only on Windows. On macOS/Linux, make migrations-up may fail unless goose is manually installed.
Agent Prompt
## Issue description
`migrations-up/down/new` call `goose`, but the Makefile doesn’t guarantee `goose` exists on macOS/Linux and the migrations targets don’t depend on any tool-installation target.
## Issue Context
- Windows `bin-deps` installs goose, but non-Windows does not.
- The Makefile now advertises migrations targets via `help`, so they should work reliably.
## Fix Focus Areas
- Makefile[82-92]
- Makefile[97-112]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
…ildberries#100 Update test2.py #1 #12 #14 (#15) eugenesuv/wildberries#32 eugenesuv/wildberries#100
No description provided.