2018-11-15 04:09:57 +01:00
|
|
|
import os
|
2019-03-12 12:09:01 +01:00
|
|
|
from pathlib import Path
|
2018-11-15 04:09:57 +01:00
|
|
|
|
|
|
|
## Const
|
|
|
|
DEFAULT_UID = 10000
|
|
|
|
DEFAULT_GID = 10000
|
|
|
|
|
|
|
|
## Global variable
|
|
|
|
base_dir = '/harbor_make'
|
|
|
|
templates_dir = "/usr/src/app/templates"
|
2019-03-12 12:09:01 +01:00
|
|
|
config_dir = '/config'
|
2018-11-15 04:09:57 +01:00
|
|
|
|
2019-03-12 12:09:01 +01:00
|
|
|
secret_dir = '/secret'
|
|
|
|
secret_key_dir='/secret/keys'
|
|
|
|
|
2019-03-18 03:14:00 +01:00
|
|
|
old_private_key_pem_path = Path('/config/core/private_key.pem')
|
|
|
|
old_crt_path = Path('/config/registry/root.crt')
|
|
|
|
|
2019-03-12 12:09:01 +01:00
|
|
|
private_key_pem_path = Path('/secret/core/private_key.pem')
|
|
|
|
root_crt_path = Path('/secret/registry/root.crt')
|
|
|
|
|
|
|
|
config_file_path = '/compose_location/harbor.yml'
|
2019-03-18 08:07:19 +01:00
|
|
|
versions_file_path = Path('/usr/src/app/versions')
|
2018-11-15 04:09:57 +01:00
|
|
|
|
|
|
|
cert_dir = os.path.join(config_dir, "nginx", "cert")
|
|
|
|
core_cert_dir = os.path.join(config_dir, "core", "certificates")
|
2019-03-12 12:09:01 +01:00
|
|
|
|
|
|
|
registry_custom_ca_bundle_storage_path = Path('/secret/common/custom-ca-bundle.crt')
|
|
|
|
registry_custom_ca_bundle_storage_input_path = Path('/input/common/custom-ca-bundle.crt')
|