feat: debug multistage build
This commit is contained in:
parent
b9006e4a1b
commit
3cea551988
@ -8,7 +8,4 @@
|
||||
|
||||
# directories
|
||||
/vendor/
|
||||
/build/
|
||||
|
||||
go.mod
|
||||
go.sum
|
||||
/build/
|
||||
@ -1,7 +1,7 @@
|
||||
LABEL org.opencontainers.image.authors="psssix <psssix@gmail.com>"
|
||||
|
||||
FROM golang:alpine as builder
|
||||
|
||||
LABEL org.opencontainers.image.authors="psssix <psssix@gmail.com>"
|
||||
|
||||
# set build environmet variables needed for multistage building
|
||||
ENV CGO_ENABLED=0 \
|
||||
GOOS=linux
|
||||
@ -29,10 +29,10 @@ WORKDIR /
|
||||
|
||||
# Copy binary from build to main folder
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=builder build/app app
|
||||
COPY --from=builder /source/build/app app
|
||||
|
||||
# Copy some application assets
|
||||
#COPY ./database/data.json /dist/database/data.json
|
||||
#COPY ./database/data.json /database/data.json
|
||||
# Export necessary port
|
||||
#EXPOSE 3000
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
type Config struct {
|
||||
API struct {
|
||||
Token string `env:"TOKEN" env-layout:"string" env-required:"true"`
|
||||
Owner int `env:"OWNER" env-layout:"int" env-required:"true"`
|
||||
Owner int `env:"OWNER" env-layout:"int" env-required:"true"`
|
||||
}
|
||||
Paths struct {
|
||||
Docs string `env:"DOCS_PATH" env-layout:"string" env-default:"docs" env-upd:"true"`
|
||||
@ -23,7 +23,7 @@ func GetConfig() Config {
|
||||
once.Do(func() {
|
||||
err := cleanenv.ReadEnv(&cfg)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
panic(err)
|
||||
}
|
||||
})
|
||||
return cfg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user