Repository: ksysoev/make-it-public
Pull request #66: Add docker support for nginx and mitserver
Author: login: shan-96
Created: 2025-04-27T19:22:38Z | Merged: 2025-04-28T15:48:12Z

#44 

- add nginx in front of mitserver
- add docker
- modify makefile


Diff:
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..db7fceb
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
diff --git a/Makefile b/Makefile
index f452167..61b877c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,4 +5,10 @@ lint:
 	golangci-lint run
 
 mocks:
-	mockery
\ No newline at end of file
+	mockery
+
+mod-tidy:
+	go mod tidy
+
+fmt:
+	go fmt ./...
diff --git a/docker-compose.yml b/docker-compose.yml
index ef6dfdb..0480a31 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -4,4 +4,28 @@ services:
     environment:
       - ALLOW_EMPTY_PASSWORD=yes
     ports:
-      - "6379:6379"
\ No newline at end of file
+      - "6379:6379"
+  
+  mitserver:
+    build:
+      context: .
+      dockerfile: Dockerfile
+    container_name: mitserver
+    ports:
+      - "8080:8080" # HTTP server
+      - "8081:8081" # Reverse proxy
+      - "8082:8082" # API server
+    volumes:
+      - ./runtime/config.yaml:/runtime/config.yaml
+    depends_on:
+      - redis
+
+  nginx:
+    image: nginx:latest
+    container_name: nginx-proxy
+    ports:
+      - "80:80"
+    volumes:
+      - ./nginx.conf:/etc/nginx/nginx.conf:ro
+    depends_on:
+      - mitserver
diff --git a/go.mod b/go.mod
index f6b8f7e..438a9e9 100644
--- a/go.mod
+++ b/go.mod
@@ -3,8 +3,11 @@ module github.com/ksysoev/make-it-public
 go 1.24.2
 
 require (
+	github.com/go-redis/redismock/v9 v9.2.0
 	github.com/google/uuid v1.6.0
 	github.com/ksysoev/revdial v0.3.2
+	github.com/mileusna/useragent v1.3.5
+	github.com/redis/go-redis/v9 v9.7.3
 	github.com/spf13/cobra v1.9.1
 	github.com/spf13/viper v1.20.1
 	github.com/stretchr/testify v1.10.0
@@ -16,13 +19,10 @@ require (
 	github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
 	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
 	github.com/fsnotify/fsnotify v1.9.0 // indirect
-	github.com/go-redis/redismock/v9 v9.2.0 // indirect
 	github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
 	github.com/inconshreveable/mousetrap v1.1.0 // indirect
-	github.com/mileusna/useragent v1.3.5 // indirect
 	github.com/pelletier/go-toml/v2 v2.2.4 // indirect
 	github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
-	github.com/redis/go-redis/v9 v9.7.3 // indirect
 	github.com/sagikazarmark/locafero v0.9.0 // indirect
 	github.com/sourcegraph/conc v0.3.0 // indirect
 	github.com/spf13/afero v1.14.0 // indirect
diff --git a/go.sum b/go.sum
index a4b7a9f..1f27196 100644
--- a/go.sum
+++ b/go.sum
@@ -1,3 +1,7 @@
+github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
+github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
+github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
+github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
 github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
 github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
 github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
@@ -27,6 +31,12 @@ github.com/ksysoev/revdial v0.3.2 h1:EZaizZjybJJbB7czCC8szhZDxV6DSYOEF/qOmqGKYqE
 github.com/ksysoev/revdial v0.3.2/go.mod h1:x4i7UcCeBPlnuqV2WI/csM0jzYF9KUs5l8VxZ5E1D/0=
 github.com/mileusna/useragent v1.3.5 h1:SJM5NzBmh/hO+4LGeATKpaEX9+b4vcGg2qXGLiNGDws=
 github.com/mileusna/useragent v1.3.5/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4ccGOMKNYYc=
+github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
+github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
+github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
+github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
+github.com/onsi/gomega v1.25.0 h1:Vw7br2PCDYijJHSfBOWhov+8cAnUf8MfMaIOV323l6Y=
+github.com/onsi/gomega v1.25.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM=
 github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
 github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
@@ -58,6 +68,8 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
 go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
 go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
+golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
+golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
 golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
 golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
 golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
@@ -67,5 +79,7 @@ golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..d1d395c
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,18 @@
+events {}
+
+http {
+    upstream mitserver {
+        server mitserver:8080; # Forward HTTP requests to the mitserver
+    }
+
+    server {
+        listen 80;
+
+        location / {
+            proxy_pass http://mitserver;
+            proxy_set_header Host $host; # Preserve the Host header
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        }
+    }
+}


Reviews:
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-27T19:44:57Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T12:21:55Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T12:26:47Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T12:28:15Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T12:29:57Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T13:16:47Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T13:17:43Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T13:22:05Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T13:55:23Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T15:19:20Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T15:33:51Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T15:35:56Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T15:36:53Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T15:38:52Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T15:40:00Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T15:40:37Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T15:42:40Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T15:43:31Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T15:45:02Z
user: login: ksysoev
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-28T15:46:10Z
user: login: shan-96
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T15:46:54Z
user: login: ksysoev
state: APPROVED
author_association: OWNER
submitted_at: 2025-04-28T15:46:56Z

Review comments:
diff_hunk: @@ -0,0 +1,21 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mitserver ./cmd/mitserver
+
+FROM alpine:latest
+
+WORKDIR /root/
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml ./runtime/config.yaml
path: Dockerfile
user: login: shan-96
body: I am having trouble copying this file to root of working directory. When I do so and modify the entrypoint accordingly, the container is unable to find the file.
```
Error: failed to load config: failed to read config: open runtime/config.yaml: no such file or directory
```
created_at: 2025-04-27T19:44:57Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,21 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mitserver ./cmd/mitserver
+
+FROM alpine:latest
+
+WORKDIR /root/
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml ./runtime/config.yaml
path: Dockerfile
user: login: ksysoev
body: @shan-96 it working fine for me, could you give more context
created_at: 2025-04-28T12:21:55Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,21 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mitserver ./cmd/mitserver
+
+FROM alpine:latest
+
+WORKDIR /root/
path: Dockerfile
user: login: ksysoev
body: - lets use `scratch` as final image, we don't need OS runtime for this service 
- please do not hardcode architecture that we can do easily multiplatform  build on ci
- for scratch image lets put binary into `/`
created_at: 2025-04-28T12:26:46Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,21 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mitserver ./cmd/mitserver
+
+FROM alpine:latest
+
+WORKDIR /root/
path: Dockerfile
user: login: ksysoev
body: you can use bff Dockerfile as reference https://github.com/ksysoev/deriv-api-bff/blob/main/Dockerfile
created_at: 2025-04-28T12:28:15Z
author_association: OWNER
diff_hunk: @@ -4,4 +4,30 @@ services:
     environment:
       - ALLOW_EMPTY_PASSWORD=yes
     ports:
-      - "6379:6379"
\ No newline at end of file
+      - "6379:6379"
+  
+  mitserver:
+    build:
+      context: .
+      dockerfile: Dockerfile
+    container_name: mitserver
+    ports:
+      - "8080:8080" # HTTP server
+      - "8081:8081" # Reverse proxy
+      - "8082:8082" # API server
+    environment:
+      - CONFIG_PATH=/runtime/config.yaml
path: docker-compose.yml
user: login: ksysoev
body: I don't see we have support for this environment variable yet
created_at: 2025-04-28T12:29:57Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,21 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mitserver ./cmd/mitserver
+
+FROM alpine:latest
+
+WORKDIR /root/
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml ./runtime/config.yaml
path: Dockerfile
user: login: shan-96
body: Modify line 16 and the entry point to give the path of config as `/runtime/config.yaml` 

This path does not work for me
created_at: 2025-04-28T13:16:47Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,21 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mitserver ./cmd/mitserver
+
+FROM alpine:latest
+
+WORKDIR /root/
path: Dockerfile
user: login: shan-96
body: Yep will remove arch
created_at: 2025-04-28T13:17:43Z
author_association: COLLABORATOR
diff_hunk: @@ -4,4 +4,30 @@ services:
     environment:
       - ALLOW_EMPTY_PASSWORD=yes
     ports:
-      - "6379:6379"
\ No newline at end of file
+      - "6379:6379"
+  
+  mitserver:
+    build:
+      context: .
+      dockerfile: Dockerfile
+    container_name: mitserver
+    ports:
+      - "8080:8080" # HTTP server
+      - "8081:8081" # Reverse proxy
+      - "8082:8082" # API server
+    environment:
+      - CONFIG_PATH=/runtime/config.yaml
path: docker-compose.yml
user: login: shan-96
body: This one I was using for debugging. Can be removed
created_at: 2025-04-28T13:22:05Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,21 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mitserver ./cmd/mitserver
+
+FROM alpine:latest
+
+WORKDIR /root/
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml ./runtime/config.yaml
path: Dockerfile
user: login: ksysoev
body: @shan-96 you set work dir to `/root/`, you're coping into /root/runtime/config.yaml...  


about cmd.. I don't think it  takes config from argument because you provide config without `--`.. I think it just use default configuration path
created_at: 2025-04-28T13:55:23Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,21 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mitserver ./cmd/mitserver
+
+FROM alpine:latest
+
+WORKDIR /root/
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml ./runtime/config.yaml
path: Dockerfile
user: login: shan-96
body: I found it. It was problem with alpine base. 
created_at: 2025-04-28T15:19:20Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: ksysoev
body: @shan-96  Are you sure 'config' argument works here? It should be '--config' 
created_at: 2025-04-28T15:33:44Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: shan-96
body: Yes it works. You can test this by
```docker-compose up --build```
created_at: 2025-04-28T15:35:56Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: shan-96
body: its strange that when I was using `--config`. It threw `Unknown flag --config` error
created_at: 2025-04-28T15:36:53Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: ksysoev
body: I think It fallbacks to default value, which is ./runtime/config.yaml. You can check in pkg/cmd/config.go
created_at: 2025-04-28T15:38:51Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: shan-96
body: hang on

created_at: 2025-04-28T15:39:55Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: ksysoev
body: https://github.com/ksysoev/make-it-public/blob/main/pkg/cmd/server/init.go#L29

Here we set default value
created_at: 2025-04-28T15:40:37Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: shan-96
body: ![image](https://github.com/user-attachments/assets/a3f154e9-3c8d-48f0-a1bd-2d7c512b2b4f)

created_at: 2025-04-28T15:42:39Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: shan-96
body: ![image](https://github.com/user-attachments/assets/53902c91-5a5e-4085-a11c-7fbcf4da22df)

created_at: 2025-04-28T15:43:30Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: ksysoev
body: My bad, after I refactored commands I didn't update this flag to be persistent... it only works for root command I think and doesn't work for serve all any more 
created_at: 2025-04-28T15:45:02Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: ksysoev
body: Let's fix it separately I think this pr good to merge
created_at: 2025-04-28T15:46:10Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,18 @@
+FROM golang:1.24.2 AS builder
+
+WORKDIR /app
+
+COPY go.mod go.sum ./
+RUN go mod download
+COPY . .
+
+RUN CGO_ENABLED=0 go build -o mitserver ./cmd/mitserver
+
+FROM scratch
+
+COPY --from=builder /app/mitserver .
+COPY ./runtime/config.yaml /runtime/config.yaml
+
+EXPOSE 8080 8081 8082
+
+CMD ["./mitserver", "serve", "all", "config", "/runtime/config.yaml"]
path: Dockerfile
user: login: shan-96
body: thanks
created_at: 2025-04-28T15:46:53Z
author_association: COLLABORATOR

PR comments:
user: login: codecov-commenter
created_at: 2025-04-27T19:24:05Z
body: ## [Codecov](https://app.codecov.io/gh/ksysoev/make-it-public/pull/66?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kirill+Sysoev) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 54.66%. Comparing base [(`e96c75f`)](https://app.codecov.io/gh/ksysoev/make-it-public/commit/e96c75ff8be042c6b38baaec7648502ceb028f53?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kirill+Sysoev) to head [(`3638d52`)](https://app.codecov.io/gh/ksysoev/make-it-public/commit/3638d5292028513e75efd363f5eb714dc244eafe?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kirill+Sysoev).

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main      #66   +/-   ##
=======================================
  Coverage   54.66%   54.66%           
=======================================
  Files          21       21           
  Lines         944      944           
=======================================
  Hits          516      516           
  Misses        411      411           
  Partials       17       17           
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/ksysoev/make-it-public/pull/66?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kirill+Sysoev).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kirill+Sysoev).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
author_association: NONE