diff --git a/.env b/.env index cc28beb..8f1911e 100644 --- a/.env +++ b/.env @@ -3,9 +3,9 @@ VERSIA_PORT=8443 #VERSIA_TLS_KEY= #VERSIA_TLS_CERT= -PUBLIC_ADDRESS=https://localhost -INSTANCE_NAME=lysand-test -INSTANCE_DESCRIPTION=Versia-Go Instance +VERSIA_INSTANCE_ADDRESS=https://localhost +VERSIA_INSTANCE_NAME=lysand-test +VERSIA_INSTANCE_DESCRIPTION=Versia-Go Instance NATS_URI=nats://localhost:4222 NATS_STREAM_NAME=versia-go diff --git a/compose.yml b/compose.yml index d437d22..219cbd3 100644 --- a/compose.yml +++ b/compose.yml @@ -30,8 +30,8 @@ services: target: /app/test.db environment: VERSIA_PORT: 8080 + VERSIA_INSTANCE_ADDRESS: https://lysand-test.i.devminer.xyz:8080 NATS_URI: nats://nats:4222 - PUBLIC_ADDRESS: https://lysand-test.i.devminer.xyz:8080 NATS_STREAM_NAME: versia-go-1 ports: - "8080:8080" @@ -45,8 +45,8 @@ services: target: /app/test.db environment: VERSIA_PORT: 8081 + VERSIA_INSTANCE_ADDRESS: https://lysand-test-2.i.devminer.xyz:8081 NATS_URI: nats://nats:4222 - PUBLIC_ADDRESS: https://lysand-test-2.i.devminer.xyz:8081 NATS_STREAM_NAME: versia-go-2 ports: - "8081:8081" diff --git a/config/config.go b/config/config.go index ef8c315..c3b7316 100644 --- a/config/config.go +++ b/config/config.go @@ -38,9 +38,9 @@ func Load() { log.Warn().Err(err).Msg("Failed to load .env file") } - publicAddress, err := url.Parse(os.Getenv("PUBLIC_ADDRESS")) + publicAddress, err := url.Parse(os.Getenv("VERSIA_INSTANCE_ADDRESS")) if err != nil { - log.Fatal().Err(err).Msg("Failed to parse PUBLIC_ADDRESS") + log.Fatal().Err(err).Msg("Failed to parse VERSIA_INSTANCE_ADDRESS") } var forwardTracesTo *regexp.Regexp @@ -66,8 +66,8 @@ func Load() { Host: publicAddress.Host, SharedInboxURL: publicAddress.ResolveReference(&url.URL{Path: "/api/inbox"}), - InstanceName: os.Getenv("INSTANCE_NAME"), - InstanceDescription: optionalEnvStr("INSTANCE_DESCRIPTION"), + InstanceName: os.Getenv("VERSIA_INSTANCE_NAME"), + InstanceDescription: optionalEnvStr("VERSIA_INSTANCE_DESCRIPTION"), NATSURI: os.Getenv("NATS_URI"), NATSStreamName: getEnvStr("NATS_STREAM_NAME", "versia-go"),