From 55ebeb04c29efed162bf7d497739f5f5cb828ecf Mon Sep 17 00:00:00 2001 From: Mike Cifelli <26522946+macifell@users.noreply.github.com> Date: Wed, 28 Feb 2024 09:58:21 -0500 Subject: [PATCH] Add podman as an alternative to docker --- api.http | 11 ++++------- beebee.yaml | 30 ++++++++++++++++++++++++++++++ pod.sh | 10 ++++++++++ 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 beebee.yaml create mode 100755 pod.sh diff --git a/api.http b/api.http index c70ae84..6928fcb 100644 --- a/api.http +++ b/api.http @@ -1,8 +1,6 @@ -POST /_add HTTP/1.1 -Host: localhost:4002 -Authorization: Basic dXNlcjpwYXNzd29yZA== +POST {{host}}/_add HTTP/1.1 +Authorization: Basic {{auth}} Content-Type: application/json -Content-Length: 58 { "url": "https://github.com", @@ -11,6 +9,5 @@ Content-Length: 58 ### -GET /_stats HTTP/1.1 -Host: localhost:4002 -Authorization: Basic dXNlcjpwYXNzd29yZA== +GET {{host}}/_stats HTTP/1.1 +Authorization: Basic {{auth}} diff --git a/beebee.yaml b/beebee.yaml new file mode 100644 index 0000000..98dd0df --- /dev/null +++ b/beebee.yaml @@ -0,0 +1,30 @@ +## +# Resources for testing and running locally - intended for use with Podman. +## + +apiVersion: v1 +kind: Pod +metadata: + labels: + app: beebee + name: beebee +spec: + containers: + - name: redis + image: docker.io/library/redis:latest + ports: + - containerPort: 6379 + hostPort: 6379 + # for beebee if we want to add it to the pod later with ./pod.sh + - containerPort: 4000 + hostPort: 4000 + volumeMounts: + - mountPath: /data + name: redis-pvc + + volumes: + - name: redis-pvc + persistentVolumeClaim: + claimName: beebee-redis + + restartPolicy: Never diff --git a/pod.sh b/pod.sh new file mode 100755 index 0000000..abc5c90 --- /dev/null +++ b/pod.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +buildah build \ + --build-arg VCS_REF="local" \ + --build-arg BUILD_DATE="local" \ + --build-arg VERSION="local" \ + --tag beebee . + +podman container rm --force --ignore "beebee-beebee" +podman run --detach --pod beebee --name "beebee-beebee" beebee