-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
52 lines (40 loc) · 1.55 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
APPSERVER_PATH=./appserver
LMDB_PATH = $(APPSERVER_PATH)/neo4japp/services/annotations/lmdb
# Fetches the LMDB files needed to run the application
lmdb:
docker compose up -d appserver
docker compose exec appserver flask load-lmdb
find $(LMDB_PATH) -name '*.mdb.backup' -delete
# Sets up everything you need to run the application
# Mostly used for first time dev environment setup
init: githooks docker-build lmdb
# Sets up commit hooks for linting
githooks:
git config --local core.hooksPath .githooks/
docker-build:
docker compose build
# Runs enough containers for the application to function
docker-run: lmdb
docker compose up -d
# Runs additional containers such as Kibana/Logstash/Filebeat
docker-run-all: lmdb
docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.middleware.yml up -d
docker-stop:
docker ps -aq | xargs docker stop
docker ps -aq | xargs docker rm
docker volume prune
docker-flask-seed:
docker compose exec appserver flask seed
clean-postgres:
# Quick command to drop the data in localhost postgres database
# Usually used to seed database from cloud backups
docker compose exec pgdatabase psql -U postgres -h pgdatabase -d postgres -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
clean-pyc:
find . -name '*.pyc' -delete
clean-docker:
docker system prune -a --volumes --filter app=kg-prototypes
clean: clean-docker clean-pyc
# Remove service account for Google Cloud
find . -name 'ansible_service_account.json' -delete
# Remove Ansible vault secrets
find . -name '.vault_secrets_pw' -delete