feat: add Docker setup with multi-stage build and docker-compose

- Add Dockerfile with golang:1.25-alpine build stage + alpine runtime stage
- Add docker-compose.yml with naviwatcher service and data volume
- Add .dockerignore for build context cleanup
- Add .gitignore for build artifacts and data directory
- Update plan: mark Task 7 checkboxes as complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 09:41:54 +03:00
parent 68660e4d83
commit 3206b10bd9
5 changed files with 63 additions and 7 deletions

View File

@@ -115,13 +115,13 @@ Build the foundation layer of NaviWatcher: a greenfield Go project with zero exi
- [x] run tests — must pass before task 7
### Task 7: Docker setup
- [ ] create `Dockerfile` with multi-stage build: build stage (golang:1.21-alpine) + runtime stage (alpine:latest)
- [ ] configure Dockerfile to copy config, build binary, expose port, set entrypoint
- [ ] create `docker-compose.yml` with naviwatcher service, volume for SQLite DB and config
- [ ] create `.dockerignore` file
- [ ] verify Docker image builds: `docker compose build`
- [ ] verify container starts and health check passes (if implemented)
- [ ] run full test suite — must pass before task 8
- [x] create `Dockerfile` with multi-stage build: build stage (golang:1.25-alpine) + runtime stage (alpine:latest)
- [x] configure Dockerfile to copy config, build binary, expose port, set entrypoint
- [x] create `docker-compose.yml` with naviwatcher service, volume for SQLite DB and config
- [x] create `.dockerignore` file
- [x] verify Docker image builds: `docker compose build`
- [x] verify container starts and health check passes (container starts, loads config, runs successfully)
- [x] run full test suite — must pass before task 8
### Task 8: Verify acceptance criteria
- [ ] verify Go module builds cleanly with `go build`