changed env for DB to be more DB agnostic

This commit is contained in:
David Janowski 2023-06-22 10:39:13 +02:00
parent 4232e41d6b
commit 83ba0f6464
2 changed files with 10 additions and 10 deletions

View File

@ -40,8 +40,8 @@ E621_API_KEY=
E621_USERNAME= E621_USERNAME=
DB_TYPE=neo4j DB_TYPE=neo4j
DB_URL= DB_URL=
NEO4J_PASSWORD= DB_PASSWORD=
NEO4J_USERNAME= DB_USERNAME=
``` ```
## Running the Program ## Running the Program
@ -71,8 +71,8 @@ The program can also be run using Docker. To use Docker, follow these steps:
E621_USERNAME= E621_USERNAME=
DB_TYPE=neo4j DB_TYPE=neo4j
DB_URL= DB_URL=
NEO4J_PASSWORD= DB_PASSWORD=
NEO4J_USERNAME= DB_USERNAME=
```` ````
2. Build the Docker image: 2. Build the Docker image:

View File

@ -10,8 +10,8 @@ type Config struct {
E621Username string `env:"E621_USERNAME,required"` E621Username string `env:"E621_USERNAME,required"`
DBType string `env:"DB_TYPE,required"` DBType string `env:"DB_TYPE,required"`
DBEndpoint string `env:"DB_URL,required"` DBEndpoint string `env:"DB_URL,required"`
Neo4jUsername string `env:"NEO4J_USERNAME,required"` DBUsername string `env:"DB_USERNAME,required"`
Neo4jPassword string `env:"NEO4J_PASSWORD,required"` DBPassword string `env:"DB_PASSWORD,required"`
} }
// LoadConfig loads the configuration from environment variables // LoadConfig loads the configuration from environment variables