Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit a3c8267c authored by Blanzat Mayeul's avatar Blanzat Mayeul

Merge branch 'mayeul/es' into 'master'

mayeul/es: add startup script to populate the ES server

See merge request !13
parents 566feb50 962e187a
......@@ -14,7 +14,12 @@ run:
.PHONY: run-target
docker-compose --file target/docker-compose.yml up --build
docker-compose --file target/docker-compose.yml up --build -d
.PHONY: stop-target
docker-compose --file target/docker-compose.yml stop
.PHONY: run-prod
run-prod: build
#! /bin/sh
status=$(curl http://localhost:8080/_cluster/health 2>/dev/null | jq .status | tr -d \")
until [ "$status" = 'yellow' ] || [ "$status" = 'green' ]
echo "ES is unavailable"
status=$(curl http://localhost:8080/_cluster/health 2>/dev/null | jq .status | tr -d \")
sleep 1
echo "ES is available"
echo "Inserting Data ..."
curl -XPOST "http://localhost:8080/password/_doc" -H "Content-Type: application/json" -d '{"username": "sha", "password": "PaysDeGallesIndependant!"}'
curl -XPOST "http://localhost:8080/password/_doc" -H "Content-Type: application/json" -d '{"username": "bob", "password": "Pa$$w0rd"}'
curl -XPOST "http://localhost:8080/password/_doc" -H "Content-Type: application/json" -d '{"username": "alice", "password": "VerySecretPassword"}'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment