-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 774 Bytes
/
Makefile
File metadata and controls
43 lines (33 loc) · 774 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
31
32
33
34
35
36
37
38
39
40
41
42
43
PROJECT := xmage-docker
DOCKER ?= docker
DPRINT ?= dprint
NIX ?= nix
PLATFORM ?= linux/amd64
docker: bin/image.tar
run: docker
$(DOCKER) run --rm -it \
-v ./hack/db:/opt/xmage/db \
-v ./hack/saved:/opt/xmage/saved \
-p 17171:17171 -p 17179:17179 \
--add-host localhost:0.0.0.0 \
-e XMAGE_SERVER_ADDRESS=localhost \
-e XMAGE_SECONDARY_BIND_PORT=17179 \
${PROJECT}:dev
test:
$(DOCKER) buildx build ${CURDIR} \
--file Dockerfile --target test
compose:
$(DOCKER) compose build
check:
$(NIX) flake check
bin/image.tar: Dockerfile entrypoint.sh
mkdir -p ${@D} && $(DOCKER) buildx build ${CURDIR} \
--output type=tar,dest=$@ \
--platform ${PLATFORM} \
--tag ${PROJECT}:dev \
--file $< \
--load
format fmt:
$(DPRINT) fmt
update:
$(NIX) flake update