Skip to content

Commit

Permalink
Modify .env to fit production standard
Browse files Browse the repository at this point in the history
Now the `.env` file should be set properly to get the project to work and provides better guidance.

Signed-off-by: Ruoqing He <[email protected]>
  • Loading branch information
TimePrinciple committed Jan 25, 2024
1 parent 14849f3 commit 5868adc
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions .env
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
# If you followed the installation guide, you can use below URL directly, comment it the otherwise.
MEGA_DB_POSTGRESQL_URL = "postgres://mega:[email protected]/mega"
# If you changed any of the username, password or host, you will need to uncomment the following line and replace the placeholders manually.
#MEGA_DB_POSTGRESQL_URL = "postgres://<username>:<password>@<host>/mega"
# Or if you are using mysql
#MEGA_DB_MYSQL_URL = "mysql://<username>:<password>@<host>/mega"
# Fillin the following environment variables with values you set
DB = "" # {postgres, mysql}
DB_USERNAME = ""
DB_PASSWORD = ""
DB_HOST = ""

MEGA_DB_POSTGRESQL_URL = "${DB}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}/mega"
MEGA_DB_MYSQL_URL = "${DB}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}/mega"
MEGA_DB_MAX_CONNECTIONS = 32
MEGA_DB_MIN_CONNECTIONS = 16

#MEGA_DB_SQLX_LOGGING = false # Whether to enabling SQLx Log

## Mega SSH key path
#MEGA_SSH_KEY = "/tmp/.mega/ssh"
MEGA_DB_SQLX_LOGGING = false # Whether to disabling SQLx Log

# Mega SSH key path
MEGA_SSH_KEY = "/tmp/.mega/ssh"

## file storage configuration
MEGA_OBJ_STORAGR_TYPE = "LOCAL" # LOCAL or REMOTE
MEGA_OBJ_LOCAL_PATH = "/tmp/.mega/objects" # This configuration is used to set the local path of the project storage

#MEGA_OBJ_REMOTE_REGION = "cn-east-3" # Remote cloud storage region
#MEGA_OBJ_REMOTE_ENDPOINT = "https://obs.cn-east-3.myhuaweicloud.com" # Override the endpoint URL used for remote storage services
MEGA_OBJ_REMOTE_REGION = "cn-east-3" # Remote cloud storage region
MEGA_OBJ_REMOTE_ENDPOINT = "https://obs.cn-east-3.myhuaweicloud.com" # Override the endpoint URL used for remote storage services

MEGA_OBJ_LOCAL_PATH = "/tmp/.mega" # This configuration is used to set the local path of the project storage
MEGA_BIG_OBJ_THRESHOLD_SIZE = 1024 # Unit KB. If the object file size exceeds the threshold value, it will be handled by file storage instead of the database.

## Init directory configuration
MEGA_INIT_DIRS = "projects,docs,third_parts" # init these repo directories in mega init command
MEGA_IMPORT_DIRS = "third_parts" # Only import directory support multi-branch commit and tag, repo under regular directory only support main branch only
GIT_INTERNAL_DECODE_CACHE_SIZE = 100 # Maximum number of git objects in LRU cache
GIT_INTERNAL_DECODE_STORAGE_BATCH_SIZE = 1000 # The maximum number of git object in a "INSERT" SQL database operation
GIT_INTERNAL_DECODE_STORAGE_TQUEUE_SIZE = 1 # The maximum number of parallel insertion threads in the database operation queue
GIT_INTERNAL_DECODE_CACHE_TYEP = "redis" # {lru,redis}

GIT_INTERNAL_DECODE_CACHE_SIZE = 1000 # Maximum number of git objects in LRU cache
GIT_INTERNAL_DECODE_STORAGE_BATCH_SIZE = 10000 # The maximum number of git object in a "INSERT" SQL database operation
GIT_INTERNAL_DECODE_STORAGE_TQUEUE_SIZE = 10 # The maximum number of parallel insertion threads in the database operation queue
GIT_INTERNAL_DECODE_CACHE_TYEP = "lru" # {lru,redis}
REDIS_CONFIG = "redis://127.0.0.1:6379"

## Bazel build config, you can use service like buildfarm to enable RBE(remote build execution)
# you can refer to https://bazelbuild.github.io/bazel-buildfarm/docs/quick_start/ for more details about remote executor
## Bazel build configuration
## you can use service like buildfarm to enable RBE(remote build execution), refer to https://bazelbuild.github.io/bazel-buildfarm/docs/quick_start/ for more details about remote executor
BAZEL_BUILD_ENABLE = false # leave true if you want to trigger bazel build in each push process
BAZEL_BUILDP_PATH = "/tmp/.mega/bazel_build_projects" # Specify a temporary directory to build the project with bazel
BAZEL_REMOTE_EXECUTOR = "grpc://localhost:8980" # If enable the remote executor, please fillin the remote executor address, or else leave empty if you want to build by localhost.
Expand Down

0 comments on commit 5868adc

Please sign in to comment.