-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (30 loc) · 1004 Bytes
/
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
install: install-server install-ui generate-dotenv hooks
start:
docker-compose up --build --force-recreate
stop:
docker-compose stop
clean:
docker-compose down
test:
yarn --cwd server test
coverage:
yarn --cwd server coverage
lint:
yarn --cwd server lint
benchmark:
docker-compose --project-directory misc/benchmarks up -d
docker-compose --project-directory misc/benchmarks run k6 run /scripts/stress.js
dataset:
docker exec referentiel_server yarn --silent --cwd server cli misc injectDataset
install-server:
yarn --cwd server install --frozen-lockfile
install-ui:
yarn --cwd ui install --frozen-lockfile
generate-dotenv:
echo "Generating JWT secret..."
grep -sqF 'REFERENTIEL_AUTH_API_JWT_SECRET' server/.env || \
echo "REFERENTIEL_AUTH_API_JWT_SECRET=$$(perl -pe 'binmode(STDIN, ":bytes"); tr/A-Za-z0-9//dc;' < /dev/urandom | head -c 13; echo '')" >> server/.env
hooks:
git config core.hooksPath misc/git-hooks
chmod +x misc/git-hooks/*
ci: install-server lint coverage