Skip to content

Commit 539f3c0

Browse files
committed
rel: Working MVP 0.1.0 with ci/cd + Dockerfile
1 parent 2a74969 commit 539f3c0

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Build
2+
FROM golang:1.22-bookworm AS build
3+
4+
5+
COPY . /usr/src/watchdog/
6+
7+
WORKDIR /usr/src/watchdog
8+
9+
RUN go build -o /usr/local/bin/watchdog .
10+
11+
12+
## Deploy
13+
FROM debian:stable-slim
14+
15+
RUN useradd watchdog
16+
COPY --from=build /usr/local/bin/watchdog /usr/local/bin/watchdog
17+
18+
WORKDIR /opt/watchdog
19+
20+
RUN chown watchdog -R /opt/watchdog
21+
22+
USER watchdog
23+
24+
ENV ADDRESS=":8080"
25+
26+
EXPOSE 8000
27+
28+
ENTRYPOINT ["/usr/local/bin/watchdog"]

cmd/watchdog.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package cmd

0 commit comments

Comments
 (0)