relative paths

This commit is contained in:
Shaz hemani 2020-09-15 16:15:26 +05:00
parent 1ee48da79f
commit e5b366462c
No known key found for this signature in database
GPG key ID: 976B8B017678D5AC
2 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
FROM golang:alpine as builder FROM golang:alpine as builder
RUN mkdir -p /go/src/app RUN mkdir -p /go/src/app
WORKDIR /go/src/app/cmd WORKDIR /go/src/app
ADD . /go/src/app ADD . /go/src/app
@ -9,4 +9,4 @@ ADD . /go/src/app
#Run go build -o bins/genityapp #Run go build -o bins/genityapp
CMD ["/go/src/app/bins/./genityapp"] CMD ["./bins/genityapp"]

View file

@ -45,7 +45,8 @@ func CloseDB() {
func goDotEnvVariable(key string) string { func goDotEnvVariable(key string) string {
// load .env file // load .env file
err := godotenv.Load("/go/src/app/configs/web.env") pwd, _ := os.Getwd()
err := godotenv.Load(pwd + "/configs/web.env")
if err != nil { if err != nil {
log.Fatalf(err.Error()) log.Fatalf(err.Error())