chore: rename port env var

This commit is contained in:
DevMiner 2024-08-24 16:52:58 +02:00
parent a183b92455
commit 728d24505d
3 changed files with 5 additions and 6 deletions

2
.env
View file

@ -1,4 +1,4 @@
PORT=8443
VERSIA_PORT=8443
PUBLIC_ADDRESS=https://localhost
INSTANCE_NAME=lysand-test

View file

@ -37,7 +37,7 @@ services:
source: ./1.db
target: /app/test.db
environment:
PORT: 8443
VERSIA_PORT: 8443
NATS_URI: nats://nats:4222
PUBLIC_ADDRESS: https://lysand-test.i.devminer.xyz:8443
NATS_STREAM_NAME: versia-go-1
@ -60,7 +60,7 @@ services:
source: ./2.db
target: /app/test.db
environment:
PORT: 8444
VERSIA_PORT: 8444
NATS_URI: nats://nats:4222
PUBLIC_ADDRESS: https://lysand-test-2.i.devminer.xyz:8444
NATS_STREAM_NAME: versia-go-2

View file

@ -43,14 +43,13 @@ func Load() {
var forwardTracesTo *regexp.Regexp
if raw := optionalEnvStr("FORWARD_TRACES_TO"); raw != nil {
if forwardTracesTo, err = regexp.Compile(*raw); err != nil {
log.Panic().Err(err).Str("raw", *raw).Msg("Failed to compile")
log.Fatal().Err(err).Str("raw", *raw).Msg("Failed to compile")
}
}
C = Config{
Port: getEnvInt("PORT", 80),
Port: getEnvInt("VERSIA_PORT", 80),
PublicAddress: publicAddress,
Host: publicAddress.Host,