Skip to content

Commit

Permalink
deploy libreoffice instead of coverpage (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall authored Aug 13, 2024
1 parent e0a9af8 commit d250c4c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 13 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/lint-test-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: lint-test
name: lint-test-build-push
on:
push:
paths-ignore:
- '*.md'
- '.github/**'
- 'ci/**'

permissions:
contents: read
Expand Down Expand Up @@ -108,4 +112,4 @@ jobs:
run: ./ci/run.sh
env:
DOCKER_REPOSITORY_BASE: us-docker.pkg.dev/${{ secrets.GCLOUD_PROJECT }}/public/scyllaridae
DOCKER_TAG: ${{steps.extract_branch.outputs.branch}}
DOCKER_TAG: ${{steps.extract_branch.outputs.branch}}
22 changes: 22 additions & 0 deletions ci/k8s/apply.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -eou pipefail

TARGET="*.yaml"
if [ $# -eq 1 ]; then
if [ ! -f "$1" ]; then
echo "$1 doesn't exit"
exit 1
fi

TARGET="$1"
fi

# Use eval to expand the wildcard in the TARGET variable
eval "set -- $TARGET"

sed -e "s|__DOMAIN__|$DOMAIN|" \
-e "s|__DOCKER_REPOSITORY__|$DOCKER_REPOSITORY|" \
-e "s|__KUBE_TLS_SECRET__|$KUBE_TLS_SECRET|" \
"$@" \
| kubectl apply -f -
2 changes: 1 addition & 1 deletion ci/k8s/houdini.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
spec:
containers:
- name: scyllaridae-imagemagick
image: __DOCKER_REPOSITORY__/scyllaridae-imagemagick:main
image: __DOCKER_REPOSITORY__/scyllaridae-imagemagick:main-dff1880
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions ci/k8s/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ spec:
- host: __DOMAIN__
http:
paths:
- path: /coverpage(/|$)(.*)
- path: /libreoffice(/|$)(.*)
pathType: Prefix
backend:
service:
name: islandora-coverpage
name: islandora-libreoffice
port:
number: 8080
- path: /crayfits(/|$)(.*)
Expand Down
16 changes: 8 additions & 8 deletions ci/k8s/coverpage.yaml → ci/k8s/libreoffice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@
apiVersion: v1
kind: Service
metadata:
name: islandora-coverpage
name: islandora-libreoffice
spec:
selector:
app: islandora-coverpage
app: islandora-libreoffice
ports:
- protocol: TCP
port: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: islandora-coverpage
name: islandora-libreoffice
spec:
replicas: 3
selector:
matchLabels:
app: islandora-coverpage
app: islandora-libreoffice
template:
metadata:
labels:
app: islandora-coverpage
app: islandora-libreoffice
spec:
containers:
- name: scyllaridae-coverpage
image: __DOCKER_REPOSITORY__/scyllaridae-coverpage:main
- name: scyllaridae-libreoffice
image: __DOCKER_REPOSITORY__/scyllaridae-libreoffice:main
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "512Mi"
memory: "1Gi"
ports:
- containerPort: 8080
readinessProbe:
Expand Down

0 comments on commit d250c4c

Please sign in to comment.