-
Notifications
You must be signed in to change notification settings - Fork 138
/
Makefile
39 lines (30 loc) · 1.18 KB
/
Makefile
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
SHELL := /bin/bash
PWD := $(shell pwd)
GIT_REMOTE = github.com/7574-sistemas-distribuidos/docker-compose-init
default: build
all:
deps:
go mod tidy
go mod vendor
build: deps
GOOS=linux go build -o bin/client github.com/7574-sistemas-distribuidos/docker-compose-init/client
.PHONY: build
docker-image:
docker build -f ./server/Dockerfile -t "server:latest" .
docker build -f ./client/Dockerfile -t "client:latest" .
# Execute this command from time to time to clean up intermediate stages generated
# during client build (your hard drive will like this :) ). Don't left uncommented if you
# want to avoid rebuilding client image every time the docker-compose-up command
# is executed, even when client code has not changed
# docker rmi `docker images --filter label=intermediateStageToBeDeleted=true -q`
.PHONY: docker-image
docker-compose-up: docker-image
docker compose -f docker-compose-dev.yaml up -d --build
.PHONY: docker-compose-up
docker-compose-down:
docker compose -f docker-compose-dev.yaml stop -t 1
docker compose -f docker-compose-dev.yaml down
.PHONY: docker-compose-down
docker-compose-logs:
docker compose -f docker-compose-dev.yaml logs -f
.PHONY: docker-compose-logs