mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-07 20:20:58 -06:00
[server] Tweak configs
This commit is contained in:
14
example.env
14
example.env
@@ -4,15 +4,17 @@ STORAGE_LOCATION=./data/storage
|
||||
# The location where your database files are stored
|
||||
PG_DATA_LOCATION=./data/postgres
|
||||
|
||||
# PHYLUM_DEBUG=0
|
||||
|
||||
# PHYLUM_SERVER_HOST=
|
||||
# PHYLUM_SERVER_PORT=2448
|
||||
# PHYLUM_SERVER_CORS_ENABLED=0
|
||||
# PHYLUM_SERVER_CORS_ORIGINS=http://localhost:5000,http://localhost:5001
|
||||
# PHYLUM_SERVER_LOG_BODY=0
|
||||
# PHYLUM_SERVER_WEB_APP_SRC=web
|
||||
# PHYLUM_SERVER_PUBLINK_PATH=/publink
|
||||
# PHYLUM_SERVER_WEBDAV_PATH=/webdav
|
||||
# PHYLUM_SERVER_LOGBODY=0
|
||||
# PHYLUM_SERVER_WEBAPPSRC=web
|
||||
# PHYLUM_SERVER_PUBLINKPATH=/pub
|
||||
# PHYLUM_SERVER_WEBDAVPATH=/webdav
|
||||
|
||||
PHYLUM_DB_NAME=phylum
|
||||
PHYLUM_DB_USER=phylum
|
||||
# PHYLUM_DB_NAME=phylum
|
||||
# PHYLUM_DB_USER=phylum
|
||||
PHYLUM_DB_PASSWORD=phylum
|
||||
|
||||
@@ -11,7 +11,7 @@ var defaultConfig = Config{
|
||||
DB: db.Config{
|
||||
Host: "localhost",
|
||||
Port: 5432,
|
||||
DBName: "phylum",
|
||||
Name: "phylum",
|
||||
User: "phylum",
|
||||
Password: "phylum",
|
||||
NoMigrate: false,
|
||||
|
||||
@@ -3,7 +3,7 @@ package db
|
||||
type Config struct {
|
||||
Host string `koanf:"host"`
|
||||
Port int `koanf:"port"`
|
||||
DBName string `koanf:"dbname"`
|
||||
Name string `koanf:"name"`
|
||||
User string `koanf:"user"`
|
||||
Password string `koanf:"password"`
|
||||
NoMigrate bool `koanf:"nomigrate"`
|
||||
|
||||
@@ -37,7 +37,7 @@ func initPool(ctx context.Context) error {
|
||||
var dsn strings.Builder
|
||||
dsn.WriteString("host=" + Cfg.Host)
|
||||
dsn.WriteString(" port=" + strconv.Itoa(Cfg.Port))
|
||||
dsn.WriteString(" dbname=" + Cfg.DBName)
|
||||
dsn.WriteString(" dbname=" + Cfg.Name)
|
||||
dsn.WriteString(" user=" + Cfg.User)
|
||||
if Cfg.Password != "" {
|
||||
dsn.WriteString(" password=" + Cfg.Password)
|
||||
|
||||
Reference in New Issue
Block a user