Skip to content

Commit

Permalink
refactor(config): separate go and yaml config files
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorPolyakov committed Aug 8, 2024
1 parent c0c33bd commit 55ec185
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
ctf01d_backend:
image: ghcr.io/sea-kg/ctf01d-training-platform:latest
environment:
CONFIG_PATH: "config/config.production.yml"
CONFIG_PATH: "configs/config.production.yml"
depends_on:
- ctf_training_platform_db
restart: always
Expand Down
4 changes: 2 additions & 2 deletions cmd/ctf01d/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"os"

"ctf01d/config"
"ctf01d/internal/app/config"
"ctf01d/internal/app/handlers"
migration "ctf01d/internal/app/migrations/psql"
"ctf01d/internal/app/server"
Expand All @@ -16,7 +16,7 @@ import (
)

func main() {
path := "./config/config.development.yml"
path := "./configs/config.development.yml"
if envPath, exists := os.LookupEnv("CONFIG_PATH"); exists {
path = envPath
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/app/migrations/psql/struct_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"ctf01d/config"
"ctf01d/internal/app/config"
)

type DatabaseUpdateFunc func(db *sql.DB, getInfo bool) (string, string, string, error)
Expand Down
4 changes: 2 additions & 2 deletions test/server_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"ctf01d/config"
"ctf01d/internal/app/config"
"ctf01d/internal/app/handlers"
migration "ctf01d/internal/app/migrations/psql"
"ctf01d/internal/app/server"
Expand All @@ -25,7 +25,7 @@ var db *sql.DB
var r *chi.Mux

func TestMain(m *testing.M) {
cfg, err := config.NewConfig("../config/config.test.yml")
cfg, err := config.NewConfig("../configs/config.test.yml")
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 55ec185

Please sign in to comment.