forked from foodcoops/foodsoft
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
23 lines (16 loc) · 858 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
.PHONY: image-dev image-prod image-prod-dev
IMAGE_NAME=mortbauer/foodsoft
IMAGE_TAG:=latest
BUILD_ARGS:= --build-arg REVISION="$(shell git rev-parse HEAD)" --build-arg BUILDTIME="$(shell date --rfc-3339=seconds)"
image-dev:
docker buildx build --tag ${IMAGE_NAME}-rubocop:${IMAGE_TAG} --progress=plain --target=dev .
image-prod:
docker buildx build --builder default --tag ${IMAGE_NAME}:${IMAGE_TAG} --progress=plain --target=app ${BUILD_ARGS} .
image-prod-push:
docker buildx build --builder default --tag ${IMAGE_NAME}:${IMAGE_TAG} --progress=plain --target=app ${BUILD_ARGS} --push .
image-prod-dev:
docker buildx build --tag ${IMAGE_NAME}:${IMAGE_TAG} --progress=plain --target=app ${BUILD_ARGS} .
rubocop:
docker run --rm -it -v ${PWD}:/work:ro --workdir /work foodsoft-rubocop bash
cleanup-routes:
git checkout plugins/*/config/routes.rb