-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (40 loc) · 2.03 KB
/
Copy pathMakefile
File metadata and controls
51 lines (40 loc) · 2.03 KB
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
COMPOSE ?= docker compose
GARAGES3_COMPOSE_FILE ?= docker-compose-garages3.yml
.PHONY: up-garages3 down-garages3 bootstrap-garages3 garage-status-garages3 start-garages3 wait-nextcloud-garages3 setup-garages3 test-hooks test-scan-images scan-images
up-garages3:
$(COMPOSE) -f $(GARAGES3_COMPOSE_FILE) up -d garage
down-garages3:
$(COMPOSE) -f $(GARAGES3_COMPOSE_FILE) down
garage-status-garages3:
$(COMPOSE) -f $(GARAGES3_COMPOSE_FILE) exec -T garage /garage status
bootstrap-garages3:
./scripts/bootstrap-garages3.sh
start-garages3:
$(COMPOSE) -f $(GARAGES3_COMPOSE_FILE) up -d db app web cron
wait-nextcloud-garages3:
@until $(COMPOSE) -f $(GARAGES3_COMPOSE_FILE) exec --user www-data app php occ status --output=json 2>/dev/null | grep -q '"installed":true'; do echo "Awaiting Nextcloud"; sleep 10; done
setup-garages3:
$(MAKE) bootstrap-garages3
$(MAKE) start-garages3
$(MAKE) wait-nextcloud-garages3
test-hooks:
bash tests/test-hooks.sh
test-scan-images:
bash tests/test-scan-images.sh
scan-images:
@set -e; \
version="$$(sed -n 's/^NEXTCLOUD_VERSION=//p' .env.example | head -n 1)"; \
test -n "$$version" || { echo 'NEXTCLOUD_VERSION is missing from .env.example' >&2; exit 1; }; \
docker buildx build --platform linux/amd64 --load --tag nextcloud-app:scan-amd64 \
--build-arg "NEXTCLOUD_VERSION=$$version" --file .docker/app/Dockerfile .docker/app; \
docker buildx build --platform linux/arm64 --load --tag nextcloud-app:scan-arm64 \
--build-arg "NEXTCLOUD_VERSION=$$version" --file .docker/app/Dockerfile .docker/app; \
docker buildx build --platform linux/amd64 --load --tag nextcloud-web:scan-amd64 \
--file .docker/web/Dockerfile .docker/web; \
docker buildx build --platform linux/arm64 --load --tag nextcloud-web:scan-arm64 \
--file .docker/web/Dockerfile .docker/web; \
bash scripts/scan-images.sh \
'app@linux/amd64=nextcloud-app:scan-amd64' \
'app@linux/arm64=nextcloud-app:scan-arm64' \
'web@linux/amd64=nextcloud-web:scan-amd64' \
'web@linux/arm64=nextcloud-web:scan-arm64'