Skip to content

Fix docker-compose storage env mismatch and internal port publish - #87

Merged
HermanPlay merged 5 commits into
masterfrom
fix/docker-compose-storage-env
Aug 10, 2026
Merged

Fix docker-compose storage env mismatch and internal port publish#87
HermanPlay merged 5 commits into
masterfrom
fix/docker-compose-storage-env

Conversation

@HermanPlay

Copy link
Copy Markdown
Member

Closes #86.

Changes

  • FILESTORAGE_HOST/FILESTORAGE_PORTSTORAGE_HOST/STORAGE_PORT in docker-compose.yaml. Config reads the latter (internal/config/worker_config.go); old names were silently ignored and defaults used.
  • Removed host publish of the file-storage internal server (8081:8081). Internal API (writes + /sign) is network-only; only public signed-URL port 8888 is exposed for local testing.
  • Added required file-storage envs (SIGNING_SECRET, port vars) so the service boots under current config.
  • Switched to ghcr.io/mini-maxit/file-storage:latest (was local-only image with pull_policy: never).
  • Added explicit WORKER_QUEUE_NAME / MAX_WORKERS to worker env.

Verification

  • go build ./... and go test ./internal/config/ pass.

…t publish

- FILESTORAGE_HOST/FILESTORAGE_PORT -> STORAGE_HOST/STORAGE_PORT (config reads
  the latter; old names were silently ignored, falling back to defaults)
- drop host publish of file-storage internal server (8081): internal API is
  network-only; expose only public signed-URL port 8888
- add required SIGNING_SECRET + port envs to file-storage service
- use ghcr image (was local-only image with pull_policy: never)
@HermanPlay
HermanPlay requested a review from a team as a code owner August 10, 2026 19:30
- test files: replace repeated string literals with constants (goconst)
- pin golangci-lint to v2.12.2 in pre-commit workflow (was @latest)
SendSolutionPackage uploads with the full FileLocation.Path as the object
key (since 'fix: packager path upload'); tests still expected parent dirs.
GetState/GetProcessingMessageID/UpdateStatus raced with ProcessTask's
state mutations (worker goroutine vs scheduler/status reads). Guard state
with RWMutex; use local messageID/responseQueue params in ProcessTask
instead of re-reading shared state. Add concurrent-access regression test.

Found via go test -race ./...
- go-unit-tests and golangci-lint hooks now pass_filenames: false (were
  run once per .go file, spawning concurrent 'go test ./...' that shared
  /tmp/<msgID> package dirs and corrupted each other)
- packager tests use unique msgID per invocation (t.TempDir parent basename)
  instead of fixed '001' / per-test-name, so concurrent runs don't collide
- align SendSolutionPackage test expectations with uploadNonEmptyFile full
  path behavior (changed in 'fix: packager path upload' 7b7da51)
@HermanPlay
HermanPlay merged commit 7745ad9 into master Aug 10, 2026
1 check passed
@HermanPlay
HermanPlay deleted the fix/docker-compose-storage-env branch August 10, 2026 21:25
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.

Fix docker-compose env mismatch (FILESTORAGE_* vs STORAGE_*)

1 participant