move app.conf to Deploy folder

This commit is contained in:
Tan Jiang 2016-06-30 18:42:35 +08:00
parent 1c7879808f
commit 72390bb494
4 changed files with 8 additions and 1 deletions

View File

@ -63,6 +63,7 @@ services:
- ./config/jobservice/env
volumes:
- /data/job_logs:/var/log/jobs
- ./config/jobservice/app.conf:/etc/jobservice/app.conf
depends_on:
- ui
logging:

View File

@ -14,6 +14,5 @@ RUN go get -d github.com/docker/distribution \
&& go get -d github.com/go-sql-driver/mysql \
&& go build -v -a -o /go/bin/harbor_jobservice \
&& chmod u+x /go/bin/harbor_jobservice
ADD ./jobservice/conf /go/bin/conf
WORKDIR /go/bin/
ENTRYPOINT ["/go/bin/harbor_jobservice"]

View File

@ -20,6 +20,7 @@ import (
"os"
"strconv"
"github.com/astaxie/beego"
"github.com/vmware/harbor/utils/log"
)
@ -79,6 +80,12 @@ func init() {
verifyRemoteCert = "on"
}
configPath := os.Getenv("CONFIG_PATH")
if len(configPath) != 0 {
log.Infof("Config path: %s", configPath)
beego.LoadAppConfig("ini", configPath)
}
log.Debugf("config: maxJobWorkers: %d", maxJobWorkers)
log.Debugf("config: localUIURL: %s", localUIURL)
log.Debugf("config: localRegURL: %s", localRegURL)