chore: clean up non-spud scripts

This commit is contained in:
Marc 2024-06-06 13:19:31 -04:00
parent da485ef2c6
commit f8a61b88c6
Signed by: marc
GPG key ID: 048E042F22B5DC79
4 changed files with 2 additions and 53 deletions

View file

@ -2,13 +2,9 @@
Private container registry to organize self-hosted services.
## Usage
## Maintaining
To start or restart the container:
```bash
IMAGE_VERSION=<image tag> ./start.sh
```
Using [spud](https://forge.karnov.club/spadinastan/spud), just `spud start ./service.yml`!
## Setting up service credentials

View file

@ -1,3 +0,0 @@
{
"service_name": "container-registry"
}

View file

@ -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"

View file

@ -1,3 +0,0 @@
#!/bin/bash
podman pod stop "$(jq .service_name ./service.json -r)"