File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,10 @@ COPY . .
99RUN go mod download
1010RUN go build -ldflags "-s -w -X 'go-public/common.Version=$(cat VERSION)'" -o go-public
1111
12- FROM alpine
13-
14- RUN apk update \
15- && apk upgrade \
16- && apk add --no-cache ca-certificates tzdata \
17- && update-ca-certificates 2>/dev/null || true
12+ FROM scratch
1813
1914COPY --from=builder /build/go-public /
20- EXPOSE 6871
15+ EXPOSE 7891
2116EXPOSE 8080
2217WORKDIR /app
23- ENTRYPOINT ["/go-public" ]
24-
18+ ENTRYPOINT ["/go-public" ]
Original file line number Diff line number Diff line change @@ -71,11 +71,13 @@ func LoadConfigFile(isServer bool) {
7171 if err != nil {
7272 println ("Config file `" + configPath + "` not found." )
7373 if isServer {
74- println ("Use `go-public init server` to initialize a config file." )
74+ println ("Generating a new config file..." )
75+ InitConfigFile (true )
76+ configBytes , _ = os .ReadFile (configPath )
7577 } else {
7678 println ("Use `go-public init client` to initialize a config file." )
79+ os .Exit (1 )
7780 }
78- os .Exit (1 )
7981 }
8082 if isServer {
8183 err = yaml .Unmarshal (configBytes , & ServerConfig )
You can’t perform that action at this time.
0 commit comments