diff --git a/Deploy/docker-compose.yml b/Deploy/docker-compose.yml index aa34dde18..c809f76b1 100644 --- a/Deploy/docker-compose.yml +++ b/Deploy/docker-compose.yml @@ -2,12 +2,14 @@ version: '2' services: log: build: ./log/ + restart: always volumes: - /var/log/harbor/:/var/log/docker/ ports: - 1514:514 registry: image: library/registry:2.4.0 + restart: always volumes: - /data/registry:/storage - ./config/registry/:/etc/registry/ @@ -26,6 +28,7 @@ services: tag: "registry" mysql: build: ./db/ + restart: always volumes: - /data/database:/var/lib/mysql env_file: @@ -43,6 +46,7 @@ services: dockerfile: Dockerfile.ui env_file: - ./config/ui/env + restart: always volumes: - ./config/ui/app.conf:/etc/ui/app.conf - ./config/ui/private_key.pem:/etc/ui/private_key.pem @@ -59,6 +63,7 @@ services: dockerfile: Dockerfile.job env_file: - ./config/jobservice/env + restart: always volumes: - /data/job_logs:/var/log/jobs - ./config/jobservice/app.conf:/etc/jobservice/app.conf @@ -71,6 +76,7 @@ services: tag: "jobservice" proxy: image: library/nginx:1.9 + restart: always volumes: - ./config/nginx:/etc/nginx ports: diff --git a/Deploy/harbor.cfg b/Deploy/harbor.cfg index c0a57d868..4069bcb9a 100644 --- a/Deploy/harbor.cfg +++ b/Deploy/harbor.cfg @@ -35,8 +35,8 @@ db_password = root123 #Turn on or off the self-registration feature self_registration = on -#Turn on or off the options for production -production = off +#Turn on or off the options to control UI whether to use compressed js file +use_compressed_js = off #Number of job workers in job service, default is 3 max_job_workers = 3 diff --git a/Deploy/prepare b/Deploy/prepare index 93c75537d..cdea56550 100755 --- a/Deploy/prepare +++ b/Deploy/prepare @@ -38,7 +38,7 @@ ldap_url = rcp.get("configuration", "ldap_url") ldap_basedn = rcp.get("configuration", "ldap_basedn") db_password = rcp.get("configuration", "db_password") self_registration = rcp.get("configuration", "self_registration") -production = rcp.get("configuration", "production") +use_compressed_js = rcp.get("configuration", "use_compressed_js") customize_crt = rcp.get("configuration", "customize_crt") crt_country = rcp.get("configuration", "crt_country") crt_state = rcp.get("configuration", "crt_state") @@ -99,7 +99,7 @@ render(os.path.join(templates_dir, "ui", "env"), ldap_url=ldap_url, ldap_basedn=ldap_basedn, self_registration=self_registration, - production=production, + use_compressed_js=use_compressed_js, ui_secret=ui_secret, verify_remote_cert=verify_remote_cert) diff --git a/Deploy/templates/ui/env b/Deploy/templates/ui/env index 980aa3dce..6a02f08ac 100644 --- a/Deploy/templates/ui/env +++ b/Deploy/templates/ui/env @@ -13,10 +13,9 @@ LDAP_URL=$ldap_url LDAP_BASE_DN=$ldap_basedn UI_SECRET=$ui_secret SELF_REGISTRATION=$self_registration -PRODUCTION=$production +PRODUCTION=$use_compressed_js LOG_LEVEL=debug GODEBUG=netdns=cgo EXT_ENDPOINT=$ui_url TOKEN_URL=http://ui VERIFY_REMOTE_CERT=$verify_remote_cert -PRODUCTION=$production