Skip to content

Commit

Permalink
fix: don't rebuild so much for local deploy (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
promiseofcake authored Sep 11, 2024
1 parent 2cc0ea8 commit 0707fbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ FROM golang:1.23-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY cmd/ ./cmd
COPY internal/ ./internal
RUN find /app

RUN go build -o artifactsmmo-engine ./cmd/engine

# runtime
FROM alpine:latest

ARG HOME_DIRECTORY

WORKDIR /app
COPY --from=builder /app/artifactsmmo-engine .
COPY .artifactsmmo-engine.yaml .
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
build:
docker build --platform linux/amd64 --build-arg HOME_DIRECTORY=$$HOME -t registry.int.renwickpl.space/promiseofcake/artifactsmmo-engine .
docker push registry.int.renwickpl.space/promiseofcake/artifactsmmo-engine
docker build --platform linux/amd64 -t $(HOME_DOCKER_REGISTRY)/promiseofcake/artifactsmmo-engine .


deploy: build
docker push $(HOME_DOCKER_REGISTRY)/promiseofcake/artifactsmmo-engine
curl -XPOST $(ARTIFACTS_WEBHOOK)

test:
go test ./...

0 comments on commit 0707fbb

Please sign in to comment.