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
|
|
|
|
|
2019-07-30 07:04:28 +02:00
|
|
|
PG_UID = 999
|
|
|
|
PG_GID = 999
|
|
|
|
|
|
|
|
REDIS_UID = 999
|
|
|
|
REDIS_GID = 999
|
|
|
|
|
2018-11-15 04:09:57 +01:00
|
|
|
## Global variable
|
2019-08-09 09:17:10 +02:00
|
|
|
host_root_dir = '/hostfs'
|
|
|
|
|
2018-11-15 04:09:57 +01:00
|
|
|
base_dir = '/harbor_make'
|
|
|
|
templates_dir = "/usr/src/app/templates"
|
2019-03-12 12:09:01 +01:00
|
|
|
config_dir = '/config'
|
2019-07-30 07:04:28 +02:00
|
|
|
data_dir = '/data'
|
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-04-02 14:08:26 +02:00
|
|
|
input_config_path = '/input/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")
|
2019-04-02 14:08:26 +02:00
|
|
|
core_cert_dir = os.path.join(config_dir, "core", "certificates")
|