Merge remote-tracking branch 'origin/main' into LPM-58
This commit is contained in:
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM golang:1.25.6-alpine AS builder
|
||||||
|
WORKDIR /app
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
COPY . .
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo \
|
||||||
|
-ldflags="-w -s" -trimpath -o survey ./cmd/survey/
|
||||||
|
|
||||||
|
FROM gcr.io/distroless/static-debian13
|
||||||
|
COPY --from=builder /app/survey /survey
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["/survey"]
|
||||||
6
Makefile
6
Makefile
@@ -11,6 +11,12 @@ build:
|
|||||||
go build -o ./bin/tui ./cmd/tui
|
go build -o ./bin/tui ./cmd/tui
|
||||||
go build -o ./bin/web ./cmd/web
|
go build -o ./bin/web ./cmd/web
|
||||||
|
|
||||||
|
docker-build:
|
||||||
|
@docker build -t survey .
|
||||||
|
|
||||||
|
docker-run:
|
||||||
|
@docker run -it -p 8080:8080 survey:latest
|
||||||
|
|
||||||
cli:
|
cli:
|
||||||
go run ./cmd/pm
|
go run ./cmd/pm
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ func initializeServices(ctx context.Context) (*service.Services, func(), error)
|
|||||||
IssuePrefix: "pm",
|
IssuePrefix: "pm",
|
||||||
BeadsDBPath: "./.pm/db.db",
|
BeadsDBPath: "./.pm/db.db",
|
||||||
StatisticsStoragePath: "./.pm/stats.json",
|
StatisticsStoragePath: "./.pm/stats.json",
|
||||||
WebAddress: "localhost:8080",
|
WebAddress: ":8080",
|
||||||
}
|
}
|
||||||
return service.NewServices(ctx, config)
|
return service.NewServices(ctx, config)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ func (t *CreateIssueTask) Config() task.TaskConfig {
|
|||||||
IssuePrefix: "pm",
|
IssuePrefix: "pm",
|
||||||
BeadsDBPath: "./.pm/db.db",
|
BeadsDBPath: "./.pm/db.db",
|
||||||
StatisticsStoragePath: "./.pm/task-1-stats.json",
|
StatisticsStoragePath: "./.pm/task-1-stats.json",
|
||||||
WebAddress: "localhost:8080",
|
WebAddress: ":8080",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ type Server struct {
|
|||||||
// NewServer creates and configures a new HTTP server instance.
|
// NewServer creates and configures a new HTTP server instance.
|
||||||
func NewServer(props Server) *http.Server {
|
func NewServer(props Server) *http.Server {
|
||||||
if props.Address == "" {
|
if props.Address == "" {
|
||||||
props.Address = "localhost:8080"
|
props.Address = ":8080"
|
||||||
}
|
}
|
||||||
|
|
||||||
handler := props.RegisterRoutes(props.Assets)
|
handler := props.RegisterRoutes(props.Assets)
|
||||||
|
|||||||
Reference in New Issue
Block a user