-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
42 lines (40 loc) · 1.6 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
default: build
COMPOSE_FILE="docker-compose.yaml"
setup:
bash tools/setup-dev-environment.sh
build:
docker compose -f ${COMPOSE_FILE} pull $(container)
docker compose -f ${COMPOSE_FILE} build $(container)
run: build
docker compose -f ${COMPOSE_FILE} up --detach $(container)
restart:
docker compose -f ${COMPOSE_FILE} restart $(container)
clean:
docker compose -f ${COMPOSE_FILE} rm --force --stop --volumes
docker rmi --force $$(docker compose -f ${COMPOSE_FILE} config --images) || true
docker volume rm --force yawa_dbdata yawa_cachedata yawa_srvdata || true
describe:
docker compose -f ${COMPOSE_FILE} ps
login:
docker compose -f ${COMPOSE_FILE} exec -it $(container) /bin/bash
check_server:
PATH="$$(pyenv virtualenv-prefix yawa-ops-dev)/envs/yawa-ops-dev/bin:$$PATH" yawa-ops health --profile admin
build_ops:
gradle -p server getOpenApiDefinition buildClients
PATH="$$(pyenv virtualenv-prefix yawa-ops-dev)/envs/yawa-ops-dev/bin:$$PATH" pip install -e ops/
open:
@if [ $(target) == "frontend" ]; then\
python3 -m webbrowser "https://localhost:8010" ;\
elif [ $(target) == "server" ]; then\
python3 -m webbrowser "https://localhost:8002" ;\
elif [ $(target) == "server_swagger" ]; then\
python3 -m webbrowser "https://localhost:8002/docs/swagger-ui/index.html" ;\
elif [ $(target) == "grafana" ]; then\
python3 -m webbrowser "http://localhost:8005" ;\
elif [ $(target) == "prometheus" ]; then\
python3 -m webbrowser "http://localhost:8004" ;\
elif [ $(target) == "dbadmin" ]; then\
python3 -m webbrowser "https://localhost:8003" ;\
else \
echo "Unknown target ${target}" ;\
fi