forked from alephdata/aleph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
93 lines (69 loc) · 2.36 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
COMPOSE=docker-compose -f docker-compose.dev.yml
APPDOCKER=$(COMPOSE) run --rm app
INGESTDOCKER=$(COMPOSE) run --rm ingest-file
ALEPH_TAG=latest
all: build upgrade web
services:
$(COMPOSE) up -d --remove-orphans \
postgres elasticsearch ingest-file \
convert-document
ingest-shell: services
$(INGESTDOCKER) /bin/bash
shell: services
$(APPDOCKER) /bin/bash
ingest-test:
$(INGESTDOCKER) nosetests --with-coverage --cover-package=ingestors
ingest-restart:
$(COMPOSE) build ingest-file convert-document
$(COMPOSE) up --force-recreate --no-deps --detach convert-document ingest-file
test:
$(APPDOCKER) contrib/test.sh
upgrade: build
$(COMPOSE) up -d postgres elasticsearch
sleep 10
$(APPDOCKER) aleph upgrade
web: services
$(COMPOSE) up api ui
worker: services
$(COMPOSE) run --rm app aleph worker
tail:
$(COMPOSE) logs -f
stop:
$(COMPOSE) down --remove-orphans
clean:
rm -rf dist build .eggs ui/build
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -type d -name __pycache__ -exec rm -r {} \+
find ui/src -name '*.css' -exec rm -f {} +
build:
$(COMPOSE) build
build-ui:
docker build -t alephdata/aleph-ui-production:$(ALEPH_TAG) -f ui/Dockerfile.production ui
build-full: build build-ui
docker-pull:
$(COMPOSE) pull --include-deps --ignore-pull-failures
docker-push:
docker push alephdata/aleph-elasticsearch:$(ALEPH_TAG)
docker push alephdata/ingest-file:$(ALEPH_TAG)
docker push alephdata/aleph:$(ALEPH_TAG)
docker push alephdata/aleph-ui:$(ALEPH_TAG)
docker push alephdata/aleph-ui-production:$(ALEPH_TAG)
dev:
pip install -q bumpversion babel jinja2
fixtures:
aleph crawldir --wait -f fixtures aleph/tests/fixtures/samples
balkhash iterate -d fixtures >aleph/tests/fixtures/samples.ijson
contrib/allCountries.zip:
curl -s -o contrib/allCountries.zip https://download.geonames.org/export/dump/allCountries.zip
geonames: contrib/allCountries.zip
unzip -p contrib/allCountries.zip | grep "ADM1\|PCLI\|PCLD\|PPLC\|PPLA" >contrib/geonames.txt
# pybabel init -i aleph/translations/messages.pot -d aleph/translations -l de -D aleph
translate: dev
pybabel extract -F babel.cfg -k lazy_gettext -o aleph/translations/messages.pot aleph
tx push --source
tx pull -a -f
pybabel compile -d aleph/translations -D aleph -f
.PHONY: build services