Some checks are pending
Build juntekim.com / Push-to-juntekim-to-docker-hub (push) Waiting to run
Build juntekim.com / run-on-k8s (push) Blocked by required conditions
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / build (push) Waiting to run
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / Deploy Postgres (PV + PVC + Deployment) (push) Blocked by required conditions
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / Apply runtime secrets (push) Blocked by required conditions
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / Run DB migrations (Atlas) (push) Blocked by required conditions
Build & Deploy stripe-to-invoice (with DB secrets + migrations) / deploy (push) Blocked by required conditions
Terraform Plan / Terraform Plan (pull_request) Waiting to run
108 lines
2.5 KiB
YAML
108 lines
2.5 KiB
YAML
# ================================
|
|
# DATABASUS - ALL IN ONE
|
|
# https://databasus.com
|
|
# Open-source DB backup management UI
|
|
# ================================
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: databasus
|
|
labels:
|
|
app: databasus
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: databasus
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: databasus
|
|
spec:
|
|
containers:
|
|
- name: databasus
|
|
image: databasus/databasus:latest
|
|
ports:
|
|
- containerPort: 4005
|
|
env:
|
|
- name: NODE_ENV
|
|
value: "production"
|
|
- name: BASE_URL
|
|
value: "https://databasus.juntekim.com"
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "256Mi"
|
|
limits:
|
|
cpu: "500m"
|
|
memory: "512Mi"
|
|
volumeMounts:
|
|
- name: databasus-data
|
|
mountPath: /databasus-data
|
|
|
|
- name: backup
|
|
image: python:3-alpine
|
|
env:
|
|
- name: AWS_ACCESS_KEY_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: databasus-backup-secret
|
|
key: AWS_ACCESS_KEY_ID
|
|
- name: AWS_SECRET_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: databasus-backup-secret
|
|
key: AWS_SECRET_ACCESS_KEY
|
|
- name: AWS_DEFAULT_REGION
|
|
value: eu-west-2
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
apk add --no-cache dcron aws-cli
|
|
echo "0 2 * * 0 TIMESTAMP=\$(date +\%Y-\%m-\%d) && tar -czf - /databasus-data | aws s3 cp - s3://juntekim-databasus-backup/databasus-backup-\${TIMESTAMP}.tar.gz" | crontab -
|
|
crond -f -l 2
|
|
volumeMounts:
|
|
- name: databasus-data
|
|
mountPath: /databasus-data
|
|
readOnly: true
|
|
|
|
volumes:
|
|
- name: databasus-data
|
|
persistentVolumeClaim:
|
|
claimName: databasus-pvc
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: databasus
|
|
spec:
|
|
selector:
|
|
app: databasus
|
|
ports:
|
|
- port: 4005
|
|
targetPort: 4005
|
|
|
|
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: databasus-ingressroute
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- match: Host(`databasus.juntekim.com`)
|
|
kind: Rule
|
|
services:
|
|
- name: databasus
|
|
port: 4005
|
|
tls:
|
|
certResolver: myresolver
|
|
domains:
|
|
- main: databasus.juntekim.com
|