-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (17 loc) · 804 Bytes
/
Makefile
File metadata and controls
22 lines (17 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
all: local_lb
# note for mobile dev, you will need to also add DNS entries for the env aliases
# (e.g. <host>-<service>.<domain>)
# to be the IP of this host on the LAN shared with the mobile devices
local_routing_on:
sudo hostctl add domains warp_local $$(warpctl lb list-hosts local --envalias=$$(hostname) | awk '{ print "\""$$0"\""}')
local_routing_off:
sudo hostctl remove warp_local
# using env local, runs an lb for local development
# build and locally run each service with `warpctl runlocal <path/to/service>/Makefile`
local_lb:
# make sure we are on a local version. `runlocal` will fail otherwise
warpctl stage version local
$(MAKE) local_routing_on
trap "$(MAKE) local_routing_off" EXIT && $(MAKE) run_local_lb
run_local_lb:
warpctl run-local lb/Makefile --envalias=$$(hostname)