diff --git a/README.md b/README.md index 180c71c..291611e 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,9 @@ Private container registry to organize self-hosted services. -## Usage +## Maintaining -To start or restart the container: - -```bash -IMAGE_VERSION= ./start.sh -``` +Using [spud](https://forge.karnov.club/spadinastan/spud), just `spud start ./service.yml`! ## Setting up service credentials diff --git a/service.json b/service.json deleted file mode 100644 index 995c19d..0000000 --- a/service.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "service_name": "container-registry" -} diff --git a/start.sh b/start.sh deleted file mode 100755 index 029f06b..0000000 --- a/start.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -service_name=$(jq .service_name ./service.json -r) -image_name=$service_name -image_version=${IMAGE_VERSION:-local} - -auth_volume="$service_name"_auth -data_volume="$service_name"_data - -podman volume exists "$auth_volume" - -if [[ "$?" != "1" ]]; then - echo "Volume $auth_volume already exists." -else - podman volume create "$auth_volume" - htpasswd_parent=$(podman volume inspect "$auth_volume" | jq '.[0].Mountpoint' -r) - touch "$htpasswd_parent"/htpasswd - echo "Created volume $auth_volume and seeded with empty htpasswd." -fi - -podman volume exists "$data_volume" - -if [[ "$?" != "1" ]]; then - echo "Volume $data_volume already exists." -else - podman volume create "$data_volume" - echo "Created volume $data_volume." -fi - -podman pod create \ - --name "$service_name" \ - --replace \ - -p 5000:5000 \ - -podman run \ - -td \ - --pod "$service_name" \ - --name "$service_name"_app \ - -v "$auth_volume":/auth:ro \ - -v "$data_volume":/var/lib/registry \ - "$image_name:$image_version" diff --git a/stop.sh b/stop.sh deleted file mode 100755 index 565bac4..0000000 --- a/stop.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -podman pod stop "$(jq .service_name ./service.json -r)"