-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (30 loc) · 847 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
#!/bin/bash
APP = ikerib/egutegia
NGINX_APP = ikerib/nginx-egutegia
VERSION := $(shell date +%Y-%m-%d)
DOCKER_TAG_DATE = ${APP}:${VERSION}
NGINX_DOCKER_TAG_DATE = ${APP}:${VERSION}
DOCKER_TAG_LATEST = ${APP}:latest
NGINX_DOCKER_TAG_LATEST = ${APP}:latest
USER_ID = $(shell id -u)
GROUP_ID= $(shell id -g)
user==www-data
help:
@echo 'usage: make [target]'
@echo
@echo 'targets'
@egrep '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ":#"
build: ## build
docker compose --env-file .env.local build
build-force:
docker compose --env-file .env.local build --force-rm --no-cache
restart:
$(MAKE) stop && $(MAKE) run
run: ## run
USER_ID=${USER_ID} GROUP_ID=${GROUP_ID} docker compose --env-file .env.local up -d
stop:
docker compose down
ssh:
docker compose exec app bash
up:
docker compose -f docker-compose.prod.yml up -d