-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathdatabase.mk
More file actions
39 lines (31 loc) · 908 Bytes
/
database.mk
File metadata and controls
39 lines (31 loc) · 908 Bytes
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
# Overridable
export POSTGIS_VERSION ?= 15-3
export POSTGIS_IMAGE_TAG ?= $(REGISTRY_PREFIX)postgis:$(POSTGIS_VERSION)
# We need to start the database when running tests locally
start-db:
@echo "Starting database"
@cd .docker && docker compose up -d --wait
stop-db:
@echo "Stopping database"
@cd .docker && docker compose down -v
run-db-command:
{ \
cd .docker; \
export DB_COMMAND="${DB_COMMAND}"; \
docker compose --profile=dbrunner up \
--quiet-pull \
--abort-on-container-exit \
--exit-code-from db-runner; \
docker compose --profile=dbrunner down -v; \
}
#schemaspy:
# @rm -rf docs/database/ && mkdir docs/database/
# { \
# cd .docker; \
# export DB_COMMAND="./install_db_and_wait.sh"; \
# docker compose --profile=schemaspy up \
# --quiet-pull \
# --abort-on-container-exit \
# --exit-code-from schemaspy; \
# docker compose --profile=schemaspy down -v; \
# }