diff --git a/build/docker-compose.yml b/build/docker-compose.yml index 485e43d..d8903e4 100644 --- a/build/docker-compose.yml +++ b/build/docker-compose.yml @@ -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 diff --git a/cmd/ctf01d/main.go b/cmd/ctf01d/main.go index e061b0c..9e0dad6 100644 --- a/cmd/ctf01d/main.go +++ b/cmd/ctf01d/main.go @@ -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" @@ -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 } diff --git a/config/config.development.yml b/configs/config.development.yml similarity index 100% rename from config/config.development.yml rename to configs/config.development.yml diff --git a/config/config.production.yml b/configs/config.production.yml similarity index 100% rename from config/config.production.yml rename to configs/config.production.yml diff --git a/config/config.test.yml b/configs/config.test.yml similarity index 100% rename from config/config.test.yml rename to configs/config.test.yml diff --git a/config/config.go b/internal/app/config/config.go similarity index 100% rename from config/config.go rename to internal/app/config/config.go diff --git a/internal/app/migrations/psql/struct_updater.go b/internal/app/migrations/psql/struct_updater.go index bbcc3c6..39ba81b 100644 --- a/internal/app/migrations/psql/struct_updater.go +++ b/internal/app/migrations/psql/struct_updater.go @@ -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) diff --git a/test/server_integration_test.go b/test/server_integration_test.go index 69b7453..067884b 100644 --- a/test/server_integration_test.go +++ b/test/server_integration_test.go @@ -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" @@ -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) }