Remove unused DB_TYPE configuration variable
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
DB_TYPE=sqlite
|
||||
DB_PATH=./data/apocapoc.db
|
||||
|
||||
PORT=8080
|
||||
|
||||
@@ -9,7 +9,7 @@ Self-hosted habit tracking service with a clean, hexagonal architecture.
|
||||
- **Carry-over support**: Choose if incomplete habits persist or expire
|
||||
- **Full history tracking**: Complete audit trail of all interactions
|
||||
- **Charts & Analytics**: Heatmaps, line charts, and statistics
|
||||
- **Self-hosted first**: Easy deployment with SQLite or PostgreSQL
|
||||
- **Self-hosted first**: Easy deployment with SQLite
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -24,7 +24,6 @@ services:
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- DB_TYPE=sqlite
|
||||
- DB_PATH=/data/apocapoc.db
|
||||
- JWT_SECRET=YOUR_SECRET_HERE
|
||||
- JWT_EXPIRY=24h
|
||||
@@ -69,7 +68,7 @@ The API will be available at `http://localhost:8080`
|
||||
### Prerequisites
|
||||
|
||||
- Go 1.23+
|
||||
- SQLite (or PostgreSQL)
|
||||
- SQLite
|
||||
|
||||
### Running locally
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
DBType string
|
||||
DBPath string
|
||||
Port string
|
||||
Host string
|
||||
@@ -23,7 +22,6 @@ func Load() (*Config, error) {
|
||||
godotenv.Load()
|
||||
|
||||
cfg := &Config{
|
||||
DBType: os.Getenv("DB_TYPE"),
|
||||
DBPath: os.Getenv("DB_PATH"),
|
||||
Port: getEnvOrDefault("PORT", "8080"),
|
||||
Host: getEnvOrDefault("HOST", "0.0.0.0"),
|
||||
@@ -34,9 +32,6 @@ func Load() (*Config, error) {
|
||||
DefaultTimezone: os.Getenv("DEFAULT_TIMEZONE"),
|
||||
}
|
||||
|
||||
if cfg.DBType == "" {
|
||||
return nil, fmt.Errorf("DB_TYPE is required")
|
||||
}
|
||||
if cfg.DBPath == "" {
|
||||
return nil, fmt.Errorf("DB_PATH is required")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user