Skip to content

[Compose,Helm] Optimize lfs upload #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker/compose/.env
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ SERVER_PROTOCOL="http"
CSGHUB_PORTAL_ENABLE_HTTPS=false
CSGHUB_MULTI_SYNC_ENABLED=true

####################################################################################
# Csghub-SERVER Configuration
####################################################################################
# If the machine performance is not good enable direct lfs upload
CSGHUB_LFS_DIRECT_UPLOAD=false

####################################################################################
# Data Volumes Configuration
####################################################################################
Expand Down
8 changes: 5 additions & 3 deletions docker/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ services:
- "${GIT_SSH_PORT:-2222}:2222"
- "${REGISTRY_PORT:-5000}:5000"
- "${CASDOOR_PORT:-8000}:8000"
- "${MINIO_API_PORT:-9000}:9000"
- "${MINIO_CONSOLE_PORT:-9001}:9001"
volumes:
- ./configs/nginx/nginx.conf:/etc/nginx/nginx.conf:r
- ./configs/nginx/ssl:/etc/nginx/ssl:r
Expand Down Expand Up @@ -135,10 +133,13 @@ services:
ipv4_address: 192.171.100.104

minio:
image: ${CSGHUB_IMAGE_PREFIX}/bitnami/minio:2023
image: ${CSGHUB_IMAGE_PREFIX}/bitnami/minio:2025
depends_on:
fluentd:
condition: service_healthy
ports:
- "${MINIO_API_PORT:-9000}:9000"
- "${MINIO_CONSOLE_PORT:-9001}:9001"
environment:
MINIO_ROOT_USER: "$MINIO_ROOT_USER"
MINIO_ROOT_PASSWORD: "$MINIO_ROOT_PASSWORD"
Expand Down Expand Up @@ -282,6 +283,7 @@ services:
STARHUB_SERVER_S3_REGION: "$MINIO_REGION"
STARHUB_SERVER_S3_ENABLE_SSL: "$MINIO_ENABLE_SSL"
STARHUB_SERVER_S3_BUCKET_LOOKUP: "path"
STARHUB_SERVER_SKIP_LFS_FILE_VALIDATION: "{CSGHUB_LFS_DIRECT_UPLOAD:-false}"
# Csghub Space Builder
STARHUB_SERVER_SPACE_BUILDER_ENDPOINT: "http://csghub-builder:8080"
STARHUB_SERVER_SPACE_RUNNER_ENDPOINT: "http://csghub-runner:8082"
Expand Down
1 change: 1 addition & 0 deletions docker/etc/profile.d/csghub_config_load.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export STARHUB_SERVER_S3_INTERNAL_ENDPOINT=${S3_ENDPOINT}
export STARHUB_SERVER_S3_BUCKET=${S3_SERVER_BUCKET:-csghub-server}
export STARHUB_SERVER_S3_REGION=${S3_REGION:-"$MINIO_REGION_NAME"}
export STARHUB_SERVER_S3_ENABLE_SSL=${S3_ENABLE_SSL:-false}
export STARHUB_SERVER_SKIP_LFS_FILE_VALIDATION: "{CSGHUB_LFS_DIRECT_UPLOAD:-true}"
## Space Builder Configuration
export SPACE_BUILDER_PORT=${SPACE_BUILDER_PORT:-"8089"}
export STARHUB_SERVER_SPACE_BUILDER_ENDPOINT=${SPACE_BUILDER_ENDPOINT:-"http://127.0.0.1:$SPACE_BUILDER_PORT"}
Expand Down
1 change: 1 addition & 0 deletions helm/charts/csghub/charts/server/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ data:
{{- else }}
STARHUB_SERVER_S3_BUCKET_LOOKUP: "auto"
{{- end }}
STARHUB_SERVER_SKIP_LFS_FILE_VALIDATION: {{ .Values.objectStore.directUpload | quote }}
# Gitaly Connection Info
STARHUB_SERVER_GITSERVER_TYPE: "gitaly"
STARHUB_SERVER_GITALY_SERVER_SOCKET: {{ include "csghub.gitaly.endpoint" . }}
Expand Down
2 changes: 2 additions & 0 deletions helm/charts/csghub/charts/server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ objectStore:
## For example, the URL will be in the format:
## http://<minio-server>/<bucket-name>/<object-key>
pathStyle: "true"
## If the machine performance is not good enable direct lfs upload
directUpload: "false"

## podAnnotations: Allows you to add annotations to the pods. Annotations can be used to attach arbitrary -
## non-identifying metadata to objects. Tools and libraries can retrieve this metadata.
Expand Down