-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (21 loc) · 714 Bytes
/
Makefile
File metadata and controls
30 lines (21 loc) · 714 Bytes
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
ifneq (,$(wildcard ./.env))
include .env
export
endif
service = app
COMMIT := $$(git rev-parse --short HEAD)
IMAGE := ${APP_NAMESPACE}/${APP_ID}:${COMMIT}
build:
IMAGE=${IMAGE} docker-compose -f docker-compose.yml -f docker-compose.dev.yml build app
up:
IMAGE=${IMAGE} docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build
down:
IMAGE=${IMAGE} docker-compose -f docker-compose.yml -f docker-compose.dev.yml down
it:
docker exec -it ${APP_ID}-$(service) bash
deploy:
IMAGE=${IMAGE} docker-compose -f docker-compose.yml -f docker-compose.prod.yml config | docker stack deploy -c - ${APP_ID}
stop:
docker stack rm ${APP_ID}
log:
docker service logs -f ${APP_ID}_$(service)