From 89ed39eff38a0ce82cd6a557cf3057c62dbb1bfa Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Mon, 5 Aug 2019 20:45:42 +0800 Subject: [PATCH] updated Jenkinsfile --- Jenkinsfile | 6 +++--- frontend/vue.config.js | 3 +++ jenkins/develop/docker-compose.yaml | 10 +++++----- 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 frontend/vue.config.js diff --git a/Jenkinsfile b/Jenkinsfile index 7ceef1c0..30f3b99c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,11 +12,11 @@ pipeline { script { if (env.GIT_BRANCH == 'develop') { env.MODE = 'develop' + env.BASE_URL = '/dev' } else if (env.GIT_BRANCH == 'master') { env.MODE = 'production' - } else { - env.MODE = 'test' - } + env.BASE_URL = '/demo' + } } } } diff --git a/frontend/vue.config.js b/frontend/vue.config.js new file mode 100644 index 00000000..c867140e --- /dev/null +++ b/frontend/vue.config.js @@ -0,0 +1,3 @@ +module.exports = { + publicPath: process.env.BASE_URL || '/' +} diff --git a/jenkins/develop/docker-compose.yaml b/jenkins/develop/docker-compose.yaml index e0b0d0a4..2869da0e 100644 --- a/jenkins/develop/docker-compose.yaml +++ b/jenkins/develop/docker-compose.yaml @@ -3,14 +3,14 @@ services: master: image: tikazyq/crawlab:latest environment: - CRAWLAB_API_ADDRESS: "crawlab.cn/dev/api" + CRAWLAB_API_ADDRESS: "crawlab.cn/api" CRAWLAB_SERVER_MASTER: "Y" CRAWLAB_MONGO_HOST: "mongo" CRAWLAB_REDIS_ADDRESS: "redis" CRAWLAB_LOG_PATH: "/var/logs/crawlab" ports: - - "8088:8080" # frontend - - "8008:8000" # backend + - "8080:8080" # frontend + - "8000:8000" # backend depends_on: - mongo - redis @@ -27,9 +27,9 @@ services: image: mongo:latest restart: always ports: - - "27019:27017" + - "27017:27017" redis: image: redis:latest restart: always ports: - - "6389:6379" \ No newline at end of file + - "6379:6379" \ No newline at end of file