go-container: ENV в Dockerfile, без хардкода в Go

This commit is contained in:
“Naeel”
2026-08-07 07:57:53 +04:00
parent 35a07ca374
commit 91472e1259
2 changed files with 11 additions and 8 deletions
+3 -8
View File
@@ -71,16 +71,11 @@ type GPGPublicKey struct {
func main() {
// 1. Init S3 Connection
if hostname == "" {
hostname = "localhost:8080"
hostname = "localhost:5000"
}
// ── TEMPORARY HARDCODE ──────────────────────────────────────────────────
// S3 data is stored under old hostname prefix from the previous Go deploy.
// TODO: REMOVE after devops adds jsonEnv editing to containerk8s "modify".
// Then read from ENV: s3Prefix = os.Getenv("S3_PREFIX")
// And set in UI jsonEnv: "S3_PREFIX": "registry.kube5s.ru"
// ─────────────────────────────────────────────────────────────────────────
// S3_PREFIX default comes from Dockerfile ENV; override in jsonEnv if needed.
if s3Prefix == "" {
s3Prefix = "registry.kube5s.ru"
s3Prefix = hostname
}
endpoint := os.Getenv("S3_ENDPOINT")