From 186c3d7b2172cf489060ecd8298503147b684f13 Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Tue, 19 Dec 2023 23:18:58 +0100 Subject: [PATCH] add rebuild to Makefile. rebuild builds a new docker image with docker compose, afterwards docker compose down and then docker compose up -d --- Makefile | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index dcb678e..571bcb8 100644 --- a/Makefile +++ b/Makefile @@ -1,41 +1,18 @@ BINARY_NAME=Nourybot.out BINARY_NAME_API=NourybotApi.out - -xdprod: - cd cmd/nourybot && go build -o ${BINARY_NAME} - mv cmd/nourybot/${BINARY_NAME} ./bin/${BINARY_NAME} - ./bin/${BINARY_NAME} -env="prod" - -jq: - cd cmd/nourybot && go build -o ${BINARY_NAME} - mv cmd/nourybot/${BINARY_NAME} ./bin/${BINARY_NAME} - ./bin/${BINARY_NAME} -env="dev" | jq - -jqprod: - cd cmd/nourybot && go build -o ${BINARY_NAME} - mv cmd/nourybot/${BINARY_NAME} ./bin/${BINARY_NAME} - ./bin/${BINARY_NAME} -env="prod" | jq - -build: - cd cmd/nourybot && go build -o ${BINARY_NAME} - mv cmd/nourybot/${BINARY_NAME} ./bin/${BINARY_NAME} - -run: - ./bin/${BINARY_NAME} -env="prod" - up: docker compose up down: docker compose down +rebuild: + docker compose down + docker compose build + docker compose up -d + xd: docker compose down docker compose build - docker compose up - -prod: - cd cmd/nourybot && go build -o ${BINARY_NAME} - mv cmd/nourybot/${BINARY_NAME} ./bin/${BINARY_NAME} - ./bin/${BINARY_NAME} -env="prod" + docker compose up