feat: allow specifying image version when starting
All checks were successful
/ test (push) Successful in 38s
All checks were successful
/ test (push) Successful in 38s
This commit is contained in:
parent
484f9931d2
commit
019188cd37
4 changed files with 11 additions and 3 deletions
|
@ -18,4 +18,4 @@ jobs:
|
||||||
- name: Authenticate with registry
|
- name: Authenticate with registry
|
||||||
run: podman login -u srv_container-registry -p ${{ secrets.REGISTRY_TOKEN }} ${{ env.CONTAINER_ADDRESS }}
|
run: podman login -u srv_container-registry -p ${{ secrets.REGISTRY_TOKEN }} ${{ env.CONTAINER_ADDRESS }}
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: podman push container-registry:0 ${{ env.CONTAINER_ADDRESS }}/container-registry:${{ env.GITHUB_REF_NAME }}
|
run: podman push container-registry:local ${{ env.CONTAINER_ADDRESS }}/container-registry:${{ env.GITHUB_REF_NAME }}
|
||||||
|
|
|
@ -2,6 +2,14 @@
|
||||||
|
|
||||||
Private container registry to organize self-hosted services.
|
Private container registry to organize self-hosted services.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To start or restart the container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
IMAGE_VERSION=<image tag> ./start.sh
|
||||||
|
```
|
||||||
|
|
||||||
## Setting up service credentials
|
## Setting up service credentials
|
||||||
|
|
||||||
The `container-registry_auth` volume is pre-seeded with an empty `htpasswd` file that will hold the credentials for registry users.
|
The `container-registry_auth` volume is pre-seeded with an empty `htpasswd` file that will hold the credentials for registry users.
|
||||||
|
|
2
build.sh
2
build.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
image_name=$(jq .service_name ./service.json -r)
|
image_name=$(jq .service_name ./service.json -r)
|
||||||
image_version=0
|
image_version=local
|
||||||
|
|
||||||
podman build \
|
podman build \
|
||||||
-t "$image_name:$image_version" \
|
-t "$image_name:$image_version" \
|
||||||
|
|
2
start.sh
2
start.sh
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
service_name=$(jq .service_name ./service.json -r)
|
service_name=$(jq .service_name ./service.json -r)
|
||||||
image_name=$service_name
|
image_name=$service_name
|
||||||
image_version=0
|
image_version=${IMAGE_VERSION:-local}
|
||||||
|
|
||||||
auth_volume="$service_name"_auth
|
auth_volume="$service_name"_auth
|
||||||
data_volume="$service_name"_data
|
data_volume="$service_name"_data
|
||||||
|
|
Loading…
Reference in a new issue