feat(deploy): user main dockerfile修正
This commit is contained in:
parent
f915c55b6f
commit
ee12c5bba0
@ -15,7 +15,7 @@ ADD go.sum .
|
|||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY app/user/cmd/api/etc /app/etc
|
COPY app/user/cmd/api/etc /app/etc
|
||||||
RUN go build -ldflags="-s -w" -o /app/user app/user/cmd/api/main.go
|
RUN go build -ldflags="-s -w" -o /app/user app/user/cmd/api/user.go
|
||||||
|
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
@ -28,4 +28,4 @@ WORKDIR /app
|
|||||||
COPY --from=builder /app/user /app/user
|
COPY --from=builder /app/user /app/user
|
||||||
COPY --from=builder /app/etc /app/etc
|
COPY --from=builder /app/etc /app/etc
|
||||||
|
|
||||||
CMD ["./user", "-f", "etc/main.yaml"]
|
CMD ["./user", "-f", "etc/user.yaml"]
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
"github.com/zeromicro/go-zero/rest"
|
"github.com/zeromicro/go-zero/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
var configFile = flag.String("f", "etc/main.yaml", "the config file")
|
var configFile = flag.String("f", "etc/user.yaml", "the config file")
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
Loading…
Reference in New Issue
Block a user