An atproto PDS written in Go

fix: postgres data loss (#69)

authored by shi.gg and committed by

GitHub 74a98a70 1cc78f65

+2 -4
-3
cmd/cocoon/main.go
··· 419 419 case "postgres": 420 420 databaseURL := cmd.String("database-url") 421 421 if databaseURL == "" { 422 - databaseURL = cmd.String("database-url") 423 - } 424 - if databaseURL == "" { 425 422 return nil, fmt.Errorf("COCOON_DATABASE_URL or DATABASE_URL must be set when using postgres") 426 423 } 427 424 return gorm.Open(postgres.Open(databaseURL), &gorm.Config{})
+2 -1
docker-compose.postgres.yaml
··· 1 1 # Docker Compose with PostgreSQL 2 - # 2 + # 3 3 # Usage: 4 4 # docker-compose -f docker-compose.postgres.yaml up -d 5 5 # ··· 18 18 POSTGRES_USER: cocoon 19 19 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required} 20 20 POSTGRES_DB: cocoon 21 + PGDATA: /var/lib/postgresql/data 21 22 volumes: 22 23 - postgres_data:/var/lib/postgresql/data 23 24 healthcheck: