forked from async-aws/aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (40 loc) · 1.88 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
43
44
45
46
47
48
SHELL := /bin/bash
COMPONENTS := $(shell find src -maxdepth 4 -type f -name Makefile | sed -e 's/\/Makefile//g' | sort)
SUBCLEAN = $(addsuffix .clean,$(COMPONENTS))
SUBINITIALIZE = $(addsuffix .initialize,$(COMPONENTS))
.PHONY: clean $(SUBCLEAN)
clean: $(SUBCLEAN)
$(SUBCLEAN): %.clean:
$(MAKE) -C $* clean
.PHONY: initialize $(SUBINITIALIZE)
initialize: start-docker
$(MAKE) $(SUBINITIALIZE)
$(SUBINITIALIZE): %.initialize:
$(MAKE) -C $* initialize
start-docker: start-docker-s3 start-docker-kms start-docker-localstack
start-docker-localstack:
docker pull localstack/localstack
docker start async_aws_localstack && exit 0 || \
docker run -d -p 4566:4566 -p 4567:4566 -p 4568:4566 -p 4571:4566 -p 4572:4566 -p 4573:4566 -p 4574:4566 -p 4575:4566 -p 4576:4566 -p 4577:4566 -p 4578:4566 -e SERVICES=sts,cloudformation,logs,events,iam,sns,ssm,dynamodb,route53,kinesis,secretsmanager -v /var/run/docker.sock:/var/run/docker.sock --name async_aws_localstack localstack/localstack && \
docker run --rm --link async_aws_localstack:localstack martin/wait -c localstack:4566
start-docker-s3:
docker pull asyncaws/testing-s3
docker start async_aws_s3 && exit 0 || \
docker run -d -p 4569:4569 -p 4570:4569 --name async_aws_s3 asyncaws/testing-s3
start-docker-kms:
docker pull nsmithuk/local-kms
docker start async_aws_kms && exit 0 || \
docker run -d -p 4579:8080 --name async_aws_kms nsmithuk/local-kms
stop-docker: clean
docker stop async_aws_localstack || true
test: initialize
./vendor/bin/simple-phpunit
website-assets: website/template/assets/app.css
website/template/assets/app.css: website/node_modules website/assets/*
cd website && ./node_modules/.bin/encore prod
website/node_modules: website/package.json
cd website && npm install
website-post-process: website/node_modules
ifneq (,$(wildcard .couscous/generated/index.html))
cd website && npm run post-process ${PWD}/.couscous/generated;
endif