Merge pull request #459 from reasonerjt/job-service

move app.conf of jobservice to Deploy folder
This commit is contained in:
Daniel Jiang 2016-06-30 18:46:05 +08:00 committed by GitHub
commit 59559e9961
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)