19 Commits

Author SHA1 Message Date
admin
a3be4ead1d fix: remove jq from health check, response is not JSON 2026-03-04 21:11:02 +00:00
admin
8765608603 fix: scp dotfile bug, remote mkdir, registry auth, SSH -T flag 2026-03-04 20:31:20 +00:00
admin
9d0240bf3f fix: use registry hostname as auth key, include owner in REGISTRY_URL 2026-03-04 20:22:01 +00:00
admin
b86c76a2fc fix: bypass docker login, pre-populate auth config for HTTP registry push 2026-03-04 20:18:20 +00:00
admin
392d4925cf fix: use DOCKER_HOST for pack --docker-host to fix nested container socket mount 2026-03-04 20:06:23 +00:00
admin
ec65a99b99 fix: use docker driver for buildx to work with rootless Podman 2026-03-04 20:02:35 +00:00
920c910c23 Fix build workflow: split Save image artifact into two steps
- Separate docker save command from upload-artifact action
- Fix invalid syntax error (cannot use both uses: and run: in same step)
- Steps now properly separated: Save image to file, then Upload image artifact
2025-11-21 16:36:00 +03:00
1db56d6741 Fix lint errors: add error checks for errcheck linter
All checks were successful
Run Tests / Run Go Tests (push) Successful in 2m24s
Run Tests / Lint Code (push) Successful in 3m36s
- Add error check for JSON response in panic handler
- Remove duplicate defer CloseDB() call (handled in shutdown)
- Add error checks for all WriteField() calls in test files
- Add error checks for CreateFormFile() and Write() calls
- Fix golangci-lint Go 1.25 compatibility by installing from source
2025-11-21 15:55:12 +03:00
58df1359e1 Update Gitea workflow to allow golangci-lint failures and install from source for Go 1.25 compatibility. Comment out coverage upload step.
Some checks failed
Run Tests / Run Go Tests (push) Successful in 43s
Run Tests / Lint Code (push) Failing after 3m0s
2025-11-21 15:48:08 +03:00
971c62afc5 Fix workflow path filters for repository root structure
Some checks failed
Run Tests / Run Go Tests (push) Successful in 4m21s
Run Tests / Lint Code (push) Failing after 54s
2025-11-21 15:27:02 +03:00
1d37f50604 workflow commit trigger 2025-11-21 15:20:31 +03:00
a43658af84 Merge pull request 'feature/clean-public-urls' (#1) from feature/clean-public-urls into main
Reviewed-on: http://72.61.144.167:3000/admin/jd-book-uploader-backend/pulls/1
2025-11-21 12:14:34 +00:00
ca62651c3c chore: update .gitignore to include additional Gitea workflow files
- Added .gitea/workflows/deploy.yml and .gitea/workflows/build.yml to .gitignore to prevent tracking of these workflow configuration files.
2025-11-21 15:13:15 +03:00
a52b2d13f0 Add Gitea workflows for CI/CD pipeline 2025-11-21 15:03:31 +03:00
ianshaloom
528ae0072e fix: correct heading in Gitea workflow documentation
- Updated the heading from "Related Documentation" to "Related Documentations" for consistency in the .gitea/workflows/README.md file.
2025-11-21 14:56:04 +03:00
ianshaloom
27f6629308 chore: remove unnecessary blank line in Gitea workflow configuration
- Cleaned up the .gitea/workflows/test.yml file by removing an extra blank line for better readability.
2025-11-21 14:37:12 +03:00
ianshaloom
9a5508ffe8 chore: update .gitignore to include Gitea workflow files
- Added .gitea/workflows/deploy.yml and .gitea/workflows/build.yml to .gitignore to prevent tracking of workflow configuration files.
2025-11-21 14:23:50 +03:00
ianshaloom
d5b78d7449 feat: implement clean public URLs and slug-based image storage
- Update Firebase service to use clean GCS URLs instead of MediaLink
- Set ACL to make uploaded files publicly accessible
- Use slug as image filename to prevent overwrites
- Add unique constraints on slug columns in books and stationery tables
- Add slug existence checks before upload (409 Conflict if duplicate)
- Update storage paths: /jd-bookshop/books and /jd-bookshop/stationery
- Remove year/month from storage paths as requested
- Construct URLs: https://storage.googleapis.com/{bucket}/{encoded-path}

Changes:
- firebase.go: Set ACL, construct clean URLs using url.PathEscape
- book.go & stationery.go: Check slug before upload, use correct paths
- book_service.go & stationery_service.go: Add slug existence check functions
- migration: Add UNIQUE constraints on slug columns
2025-11-21 10:47:01 +03:00
ianshaloom
ebeae34e01 Add initial project structure with core functionality for book and stationery uploads
- Created main application entry point in `main.go`.
- Added configuration management in `config/config.go` and tests in `config/config_test.go`.
- Implemented handlers for book and stationery uploads in `handlers/book.go` and `handlers/stationery.go`, including validation logic.
- Established database connection and services in `services/database.go` and `services/book_service.go`.
- Defined models for books and stationery in `models/book.go` and `models/stationery.go`.
- Set up Firebase integration for image uploads in `services/firebase.go`.
- Created migration scripts for database schema in `migrations/001_create_tables.sql` and subsequent updates.
- Added CORS and error handling middleware.
- Included comprehensive tests for handlers, services, and utilities.
- Documented API endpoints and usage in `README.md` and migration instructions in `migrations/README.md`.
- Introduced `.gitignore` to exclude unnecessary files and directories.
- Added Go module support with `go.mod` and `go.sum` files.
- Implemented utility functions for slug generation and validation in `utils/slug.go` and `utils/validation.go`.
2025-11-21 08:50:27 +03:00