diff --git a/build.sh b/build.sh index 1437a76..899d737 100755 --- a/build.sh +++ b/build.sh @@ -51,7 +51,7 @@ echo "Setting up Docker BuildX" docker buildx create --name mybuilder --use || true echo "Building multi-platform Docker image" -docker buildx build --load -t simple-object-storage:latest --platform linux/amd64,linux/arm64 . +docker buildx build --push -t gitea.jde.nz/j/simple-object-storage:latest --platform linux/amd64,linux/arm64 . echo "Build completed successfully!" diff --git a/src/main.cpp b/src/main.cpp index 071bb44..b4ebef9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,8 +7,13 @@ namespace simple_object_storage { int main(int argc, char* argv[]) { - std::filesystem::path config_path = std::filesystem::path(std::getenv("HOME")) / ".config/simple_object_storage/config.json"; - std::filesystem::create_directories(config_path.parent_path()); + + std::filesystem::path config_path = "/data/sos_config.json"; + if (!std::filesystem::exists(config_path)) + config_path = std::filesystem::path(std::getenv("HOME")) / ".config/simple_object_storage/config.json"; + + if (!std::filesystem::exists(config_path)) + std::filesystem::create_directories(config_path.parent_path()); ServerConfig config; if (!simple_object_storage::load_config(config_path, config)) {