From ce2ba6da6c7fd6068ece2141cc8e9dd3f5221011 Mon Sep 17 00:00:00 2001 From: quinm0 Date: Wed, 29 Apr 2026 00:00:28 -0400 Subject: [PATCH] cleanup and config work :shrug: --- bun/soupclown/bun.lock | 3 ++ bun/soupclown/index.ts | 20 ++++++- bun/soupclown/package.json | 1 + bun/soupclown/src/interface/config.ts | 2 +- config.soupclown.json | 12 ++++- docker-compose/all-down.sh | 1 - docker-compose/all-pull.sh | 1 - docker-compose/all-up.sh | 1 - docker-compose/immich-compose.yaml | 75 --------------------------- 9 files changed, 35 insertions(+), 81 deletions(-) delete mode 100644 docker-compose/immich-compose.yaml diff --git a/bun/soupclown/bun.lock b/bun/soupclown/bun.lock index 81689f9..2856aef 100644 --- a/bun/soupclown/bun.lock +++ b/bun/soupclown/bun.lock @@ -5,6 +5,7 @@ "": { "name": "soupclown", "dependencies": { + "commander": "^14.0.3", "zod": "^4.3.6", }, "devDependencies": { @@ -22,6 +23,8 @@ "bun-types": ["bun-types@1.3.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-QXKeHLlOLqQX9LgYaHJfzdBaV21T63HhFJnvuRCcjZiaUDpbs5ED1MgxbMra71CsryN/1dAoXuJJJwIv/2drVA=="], + "commander": ["commander@14.0.3", "", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="], + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], "undici-types": ["undici-types@7.19.2", "", {}, "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg=="], diff --git a/bun/soupclown/index.ts b/bun/soupclown/index.ts index f5f7bc1..0ef052f 100644 --- a/bun/soupclown/index.ts +++ b/bun/soupclown/index.ts @@ -1,3 +1,21 @@ +import { Command, program } from "commander"; import { SC_CONFIG } from "./src/interface/config"; -console.log('config', JSON.stringify(SC_CONFIG, null, 2)) \ No newline at end of file +const c = new Command(); + +export function RUN_CLI(){ + c + .name('soupclown') + .description('Soupclown system') + + c.option('--showConfig', 'display the configured config') + + const options = c.parse().opts(); + + if(options.showConfig){ + console.log(JSON.stringify(SC_CONFIG, null, 2)) + return; + } +} + +RUN_CLI(); diff --git a/bun/soupclown/package.json b/bun/soupclown/package.json index 7a0820a..c4b7120 100644 --- a/bun/soupclown/package.json +++ b/bun/soupclown/package.json @@ -10,6 +10,7 @@ "typescript": "^5" }, "dependencies": { + "commander": "^14.0.3", "zod": "^4.3.6" } } diff --git a/bun/soupclown/src/interface/config.ts b/bun/soupclown/src/interface/config.ts index 2292239..fe8a257 100644 --- a/bun/soupclown/src/interface/config.ts +++ b/bun/soupclown/src/interface/config.ts @@ -61,7 +61,7 @@ export class SC_CONFIG_C { } private async _writeConfigFile(path = DEFAULT_CONFIG_PATH){ - await Bun.write(path, JSON.stringify(this.runningConfig)); + await Bun.write(path, JSON.stringify(this.runningConfig, null, 2)); } } diff --git a/config.soupclown.json b/config.soupclown.json index 4f3c196..3d484a4 100644 --- a/config.soupclown.json +++ b/config.soupclown.json @@ -1 +1,11 @@ -{"v":"v1","data":{"services":[{"name":"doohickey","desiredState":"up"}]}} \ No newline at end of file +{ + "v": "v1", + "data": { + "services": [ + { + "name": "doohickey", + "desiredState": "up" + } + ] + } +} \ No newline at end of file diff --git a/docker-compose/all-down.sh b/docker-compose/all-down.sh index 9b4ffcc..6c71ecd 100755 --- a/docker-compose/all-down.sh +++ b/docker-compose/all-down.sh @@ -2,7 +2,6 @@ SERVICE_NAMES=( # "paperless" - # "immich" # "navidrome" "downloadin" # "matrix" diff --git a/docker-compose/all-pull.sh b/docker-compose/all-pull.sh index 9b03487..5786aef 100755 --- a/docker-compose/all-pull.sh +++ b/docker-compose/all-pull.sh @@ -2,7 +2,6 @@ SERVICE_NAMES=( # "paperless" - # "immich" # "navidrome" "downloadin" # "matrix" diff --git a/docker-compose/all-up.sh b/docker-compose/all-up.sh index 62fa566..b5171d8 100755 --- a/docker-compose/all-up.sh +++ b/docker-compose/all-up.sh @@ -2,7 +2,6 @@ SERVICE_NAMES=( # "paperless" - # "immich" # "navidrome" "downloadin" # "matrix" diff --git a/docker-compose/immich-compose.yaml b/docker-compose/immich-compose.yaml deleted file mode 100644 index b473cd5..0000000 --- a/docker-compose/immich-compose.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# -# WARNING: To install Immich, follow our guide: https://docs.immich.app/install/docker-compose -# -# Make sure to use the docker-compose.yml of the current release: -# -# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml -# -# The compose file on main may not be compatible with the latest release. - -name: immich - -services: - immich-server: - container_name: immich-server - image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} - # extends: - # file: hwaccel.transcoding.yml - # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding - volumes: - # Do not edit the next line. If you want to change the media storage location on your system, edit the value of IMMICH_UPLOAD_LOCATION in the .env file - - ${IMMICH_UPLOAD_LOCATION}:/data - - /mnt/mega/immich/old-album:/old-album - - /etc/localtime:/etc/localtime:ro - env_file: - - /etc/.soupclown.env - ports: - - "2283:2283" - depends_on: - - redis - - database - restart: always - healthcheck: - disable: false - - immich-machine-learning: - container_name: immich-machine-learning - # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag. - # Example tag: ${IMMICH_VERSION:-release}-cuda - image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} - # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration - # file: hwaccel.ml.yml - # service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable - volumes: - - model-cache:/cache - env_file: - - /etc/.soupclown.env - restart: always - healthcheck: - disable: false - - redis: - container_name: immich-redis - image: docker.io/valkey/valkey:9@sha256:fb8d272e529ea567b9bf1302245796f21a2672b8368ca3fcb938ac334e613c8f - healthcheck: - test: redis-cli ping || exit 1 - restart: always - - database: - container_name: immich-postgres - image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 - environment: - POSTGRES_PASSWORD: ${IMMICH_DB_PASSWORD} - POSTGRES_USER: ${IMMICH_DB_USERNAME} - POSTGRES_DB: ${IMMICH_DB_DATABASE_NAME} - POSTGRES_INITDB_ARGS: "--data-checksums" - # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs - # DB_STORAGE_TYPE: 'HDD' - volumes: - # Do not edit the next line. If you want to change the database storage location on your system, edit the value of IMMICH_DB_DATA_LOCATION in the .env file - - ${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data - shm_size: 128mb - restart: always - -volumes: - model-cache: