Skip to content

Commit

Permalink
build(docker): add docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
DeadNews committed Jan 7, 2024
1 parent cb037ae commit fc59f04
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ RUN go build -o /app/dist/deadnews-template-go ./...
FROM gcr.io/distroless/static-debian12:latest@sha256:4a2c1a51ae5e10ec4758a0f981be3ce5d6ac55445828463fce8dff3a355e0b75 AS runtime
LABEL maintainer "DeadNews <aurczpbgr@mozmail.com>"

ENV PORT=1271

COPY --from=go-builder /app/dist/deadnews-template-go /usr/local/bin/deadnews-template-go

USER nonroot:nonroot
EXPOSE 1271
EXPOSE ${PORT}
HEALTHCHECK NONE

CMD ["deadnews-template-go"]
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ test:

pc-run:
pre-commit run -a

docker: compose-up

compose-up:
docker compose up --build

compose-down:
docker compose down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3"
services:
web:
build: .
ports:
- 1271:1271
environment:
PORT: "1271"

0 comments on commit fc59f04

Please sign in to comment.