forked from baking-bad/bcdhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (50 loc) · 1.76 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
include .env
export $(shell sed 's/=.*//' .env)
api:
cd cmd/api && go run . -f config.yml -f config.dev.yml
indexer:
cd cmd/indexer && go run . -f config.yml -f config.dev.yml
metrics:
cd cmd/metrics && go run . -f config.yml -f config.dev.yml
aliases:
cd scripts/aliases && go run . -f ../config.yml
sitemap:
cd scripts/sitemap && go run . -f ../config.yml
rollback:
cd scripts/rollback && go run . -f ../config.yml
migration:
cd scripts/migration && go run . -f ../config.yml
es-aws:
cd scripts/es-aws && go build .
s3-creds: es-aws
docker exec -it bcd-elastic bash -c 'bin/elasticsearch-keystore add --stdin s3.client.default.access_key <<< "$$AWS_ACCESS_KEY_ID"'
docker exec -it bcd-elastic bash -c 'bin/elasticsearch-keystore add --stdin s3.client.default.secret_key <<< "$$AWS_SECRET_ACCESS_KEY"'
./scripts/es-aws/es-aws -a reload_secure_settings -f scripts/config.yml
s3-repo: es-aws
./scripts/es-aws/es-aws -a create_repository -f scripts/config.yml
s3-restore: es-aws
./scripts/es-aws/es-aws -a delete_indices -f scripts/config.yml
./scripts/es-aws/es-aws -a restore -f scripts/config.yml
s3-snapshot: es-aws
./scripts/es-aws/es-aws -a snapshot -f scripts/config.yml
s3-policy: es-aws
./scripts/es-aws/es-aws -a set_policy -f scripts/config.yml
latest:
git tag latest -f && git push origin latest -f
es-reset:
docker stop bcd-elastic || true
docker rm bcd-elastic || true
docker volume rm bcdhub_esdata || true
docker-compose up -d elastic
clearmq:
docker exec -it bcd-mq rabbitmqctl stop_app
docker exec -it bcd-mq rabbitmqctl reset
docker exec -it bcd-mq rabbitmqctl start_app
test:
go test ./...
deploy: export TAG=$(shell git pull -q && git describe --abbrev=0 --tags)
deploy:
git pull
docker-compose pull
docker-compose up -d
docker-compose ps