go-container: ENV в Dockerfile, без хардкода в Go
This commit is contained in:
+3
-8
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user