-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (29 loc) · 1016 Bytes
/
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
PROJECT := OJS
default: build
build: nginx
@docker-compose -f docker-compose.development.yaml --project ojs up -d postgres
@docker build \
--build-arg GITHUB_TOKEN=${GITHUB_TOKEN} \
-f ojs/Dockerfile -t ojs:fpm .
nginx:
@docker build -f nginx/Dockerfile -t ojs:nginx .
development:
@docker-compose -f [email protected] --project-name $(PROJECT) up
production:
@docker-compose -f [email protected] --project-name $(PROJECT) up -d
down:
@docker-compose -f docker-compose.development.yaml --project-name $(PROJECT) down
workarounds:
@sysctl -w vm.max_map_count=262144
builder:
$(MAKE) -C $@
ojs/master.zip:
@curl -L https://github.com/ojs/ojs/archive/master.zip > $@
unzip: ojs/master.zip
@unzip -o $< && rsync -avh --update -e ojs-master app
prebuild: builder unzip
@docker run --rm -it \
--volume $(CURDIR)/app:/app ojs:builder install
test: build
@docker run -it ojs pwd # sh -li
.PHONY: default build development down production workarounds prebuild builder unzip nginx