Add Docker Compose stack (Meilisearch + API image) and compose-based Task targets
This commit is contained in:
1 parent
a9674ce14e
commit
d51eda8290
4 files changed
+80
-16
No files matched your search
+23
-13
@@ -6,9 +6,6 @@ env:
|
||||
MEILI_INDEX: movies
|
||||
HTTP_ADDR: ":8080"
|
||||
|
||||
vars:
|
||||
MEILI_DATA: .meili-data
|
||||
|
||||
tasks:
|
||||
default:
|
||||
desc: List available tasks
|
||||
@@ -41,18 +38,31 @@ tasks:
|
||||
- go build -o bin/seed ./cmd/seed
|
||||
|
||||
meili:up:
|
||||
desc: Start Meilisearch in Docker on :7700
|
||||
desc: Start Meilisearch via Docker Compose on :7700
|
||||
cmds:
|
||||
- docker run -d --name meili-showcase -p 7700:7700
|
||||
-e MEILI_MASTER_KEY=$MEILI_MASTER_KEY -e MEILI_ENV=development
|
||||
-v "$PWD/{{.MEILI_DATA}}:/meili_data" getmeili/meilisearch:v1.24
|
||||
status:
|
||||
- docker ps --filter name=meili-showcase --filter status=running --format '{{"{{"}}.Names{{"}}"}}' | grep -q meili-showcase
|
||||
- docker compose up -d meilisearch
|
||||
|
||||
meili:down:
|
||||
desc: Stop and remove the Meilisearch container
|
||||
desc: Stop Compose services (keeps the data volume)
|
||||
cmds:
|
||||
- docker rm -f meili-showcase
|
||||
- docker compose down
|
||||
|
||||
meili:reset:
|
||||
desc: Stop Compose services and delete the index volume
|
||||
cmds:
|
||||
- docker compose down -v
|
||||
|
||||
meili:logs:
|
||||
desc: Tail Meilisearch logs
|
||||
cmds:
|
||||
- docker compose logs -f meilisearch
|
||||
|
||||
up:
|
||||
desc: Run engine + API in Compose (API on :8080)
|
||||
cmds:
|
||||
- docker compose --profile full up -d --build
|
||||
- task: meili:wait
|
||||
- docker compose --profile full run --rm --entrypoint /app/seed api
|
||||
|
||||
meili:wait:
|
||||
desc: Block until Meilisearch answers /health
|
||||
@@ -88,9 +98,9 @@ tasks:
|
||||
- ./scripts/demo-queries.sh
|
||||
|
||||
clean:
|
||||
desc: Remove build artifacts and local index data
|
||||
desc: Remove build artifacts (see meili:reset for index data)
|
||||
cmds:
|
||||
- rm -rf bin {{.MEILI_DATA}}
|
||||
- rm -rf bin
|
||||
|
||||
ci:
|
||||
desc: fmt + vet + test
|
||||
|
||||
Reference in new issue
Block a user