-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.app
49 lines (35 loc) · 1.2 KB
/
Makefile.app
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
# dcape-app-powerdns Makefile
# for separate app
SHELL = /bin/bash
# Stats site host
APP_SITE ?= ns.dev.test
# App names (db/user name etc)
APP_NAME ?= powerdns
#- powerdns docker image
IMAGE ?= $(PDNS_IMAGE0)
#- powerdns docker image version
IMAGE_VER ?= $(PDNS_VER0)
# ------------------------------------------------------------------------------
# Makefile internal use
# PgSQL used as DB
USE_DB = yes
# User who runs bootstrap code
DB_ADMIN_USER = $(PGUSER)
# Run SQL code via
DB_CONTAINER ?= dcape-db-1
# ------------------------------------------------------------------------------
ifeq ($(shell test -e $(DCAPE_ROOT)/Makefile.app && echo -n yes),yes)
include $(DCAPE_ROOT)/Makefile.app
else
include /opt/dcape/Makefile.app
endif
define PGUP_4_8_0
ALTER TABLE domains ALTER COLUMN type TYPE text;
ALTER TABLE domains ADD COLUMN options TEXT DEFAULT NULL,
ADD COLUMN catalog TEXT DEFAULT NULL;
CREATE INDEX catalog_idx ON domains(catalog);
endef
up-4.8.0:
@echo "$${PGUP_4_8_0}" | docker exec -i $$PG_CONTAINER psql -U $$PGUSER $$PGDATABASE
test:
curl -s -H 'X-API-Key: $(PDNS_API_KEY)' $(HTTP_PROTO)://$(APP_SITE)/pdns/api/v1/servers/localhost/zones | jq '.'