-
-
Notifications
You must be signed in to change notification settings - Fork 122
/
Makefile.custom
65 lines (55 loc) · 2.29 KB
/
Makefile.custom
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# If you want to customize Geodesic (and we fully support that),
# use this file as the basis for your own Makefile.
# Modify the variable settings to create your own version of Geodesic
# with your own Docker image name and app name.
#
# See Dockerfile.custom and Dockerfile.options for
# how to customize your Dockerfile.
# Note that Geodesic supports runtime customizations that
# do not require a custom Dockerfile: See
# https://github.com/cloudposse/geodesic/blob/main/docs/customization.md
#
#
# The `make` variables build up to $(DOCKER_IMAGE):$(DOCKER_TAG) being
# what you would use for `docker run` and `docker push`.
# You probably want to use either `latest` or `dev` for DOCKER_TAG
# unless you have a build system that can keep track of version numbers.
#
# `make install` will install a script to launch your customized Geodesic
# with lots of nice things set up for you. APP_NAME is what to call
# the script. We recommend NOT calling it "geodesic" so you do not
# get it confused with the standard Geodesic image published by Cloud Posse.
#
# After your first `make install`, you can run your customized Geodesic
# by just the app name you set, and you can update it by just running
# `make build`.
export APP_NAME = geodesic
export DOCKER_ORG ?= cloudposse
export DOCKER_IMAGE ?= $(DOCKER_ORG)/your-desired-docker-image-name
export DOCKER_TAG ?= latest
export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG)
GEODESIC_INSTALL_PATH ?= /usr/local/bin
export INSTALL_PATH ?= $(GEODESIC_INSTALL_PATH)
export SCRIPT = $(INSTALL_PATH)/$(APP_NAME)
-include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness)
## Initialize build-harness, install deps, build docker container, install wrapper script and run shell
all: init deps build install run
@exit 0
## Install dependencies (if any)
deps:
@exit 0
## Build docker image
build:
@make --no-print-directory docker/build
## Push docker image to registry
push:
docker push $(DOCKER_IMAGE)
## Install wrapper script from geodesic container
install:
@docker run --rm $(DOCKER_IMAGE_NAME) | bash -s $(DOCKER_TAG)
## Start the geodesic shell by calling wrapper script
run:
$(SCRIPT)
## Rebuild README for all Terraform components
rebuild-docs: packages/install/terraform-docs
@pre-commit run --all-files terraform_docs