aboutsummaryrefslogtreecommitdiff
path: root/code-host/Makefile
blob: ed807e1ac354dbf85e086546c0a7b860f9b9271c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
IMAGE=docker.crute.me/code-host:latest

all:
	cp ../nginx-common/main.go .
	CGO_ENABLED=0 go build -o nginx_bootstrap main.go
	rm -rf ./etc/nginx/ && cp -r ../nginx-common/conf ./etc/nginx/
	docker pull alpine:edge
	docker build -t $(IMAGE) .
	rm -rf ./etc/nginx/ main.go nginx_bootstrap

all-no-cache:
	docker build --no-cache -t $(IMAGE) .

run:
	docker run -d \
		-p 9110:9000 \
		-p 9111:9001 \
		-v /srv/code:/srv/code \
		$(IMAGE)

publish:
	docker push $(IMAGE)