Adds baserow app.
This commit is contained in:
38
baserow/versions/2/README.md
Normal file
38
baserow/versions/2/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Baserow
|
||||
|
||||
Baserow is an open-source no-code database platform — a self-hosted alternative to Airtable.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- **PostgreSQL** - Database for storing tables and workspace data
|
||||
- **Redis** - Used for caching and background job queuing
|
||||
|
||||
## Configuration
|
||||
|
||||
Key settings in `config.yaml`:
|
||||
|
||||
- **domain** - Where Baserow will be accessible
|
||||
- **storage** - Persistent volume size (default: `2Gi`)
|
||||
- **db.name** - Database name (default: `baserow`)
|
||||
|
||||
## First-Time Setup
|
||||
|
||||
1. Add and deploy the app:
|
||||
```bash
|
||||
wild app add baserow
|
||||
wild app deploy baserow
|
||||
```
|
||||
|
||||
2. Visit the app URL and sign up to create your account.
|
||||
|
||||
3. The first user to sign up can be promoted to staff/admin via the Django admin panel at `/api/admin/`.
|
||||
|
||||
## Notes
|
||||
|
||||
- To make a user a staff member (admin):
|
||||
```bash
|
||||
kubectl exec -n baserow deploy/baserow -- python /baserow/backend/manage.py shell \
|
||||
-c "from django.contrib.auth import get_user_model; u = get_user_model().objects.get(email='your@email.com'); u.is_staff = True; u.save()"
|
||||
```
|
||||
- The `secretKey` is auto-generated in `secrets.yaml`
|
||||
- Baserow supports importing data from CSV, JSON, and XML files
|
||||
63
baserow/versions/2/db-init-job.yaml
Normal file
63
baserow/versions/2/db-init-job.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: baserow-db-init
|
||||
namespace: {{ .namespace }}
|
||||
labels:
|
||||
component: db-init
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: db-init
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: db-init
|
||||
image: postgres:17
|
||||
command: ["/bin/bash", "-c"]
|
||||
args:
|
||||
- |
|
||||
PGPASSWORD=${POSTGRES_ADMIN_PASSWORD} psql -h ${DB_HOSTNAME} -U postgres <<EOF
|
||||
DO \$\$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '${DB_USERNAME}') THEN
|
||||
CREATE USER ${DB_USERNAME} WITH ENCRYPTED PASSWORD '${DB_PASSWORD}';
|
||||
ELSE
|
||||
ALTER USER ${DB_USERNAME} WITH ENCRYPTED PASSWORD '${DB_PASSWORD}';
|
||||
END IF;
|
||||
END
|
||||
\$\$;
|
||||
|
||||
SELECT 'CREATE DATABASE ${DB_DATABASE_NAME}' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = '${DB_DATABASE_NAME}')\gexec
|
||||
ALTER DATABASE ${DB_DATABASE_NAME} OWNER TO ${DB_USERNAME};
|
||||
GRANT ALL PRIVILEGES ON DATABASE ${DB_DATABASE_NAME} TO ${DB_USERNAME};
|
||||
EOF
|
||||
env:
|
||||
- name: POSTGRES_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-secrets
|
||||
key: password
|
||||
- name: DB_HOSTNAME
|
||||
value: "{{ .db.host }}"
|
||||
- name: DB_DATABASE_NAME
|
||||
value: "{{ .db.name }}"
|
||||
- name: DB_USERNAME
|
||||
value: "{{ .db.user }}"
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: baserow-secrets
|
||||
key: dbPassword
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
restartPolicy: OnFailure
|
||||
98
baserow/versions/2/deployment.yaml
Normal file
98
baserow/versions/2/deployment.yaml
Normal file
@@ -0,0 +1,98 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: baserow
|
||||
namespace: {{ .namespace }}
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
component: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: web
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
runAsUser: 0
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: baserow
|
||||
image: baserow/baserow:2.2.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: BASEROW_PUBLIC_URL
|
||||
value: https://{{ .domain }}
|
||||
- name: DATABASE_HOST
|
||||
value: "{{ .db.host }}"
|
||||
- name: DATABASE_PORT
|
||||
value: "{{ .db.port }}"
|
||||
- name: DATABASE_NAME
|
||||
value: "{{ .db.name }}"
|
||||
- name: DATABASE_USER
|
||||
value: "{{ .db.user }}"
|
||||
- name: DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: baserow-secrets
|
||||
key: dbPassword
|
||||
- name: REDIS_HOST
|
||||
value: "{{ .redis.host }}"
|
||||
- name: REDIS_PORT
|
||||
value: "6379"
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: baserow-secrets
|
||||
key: redis.password
|
||||
- name: SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: baserow-secrets
|
||||
key: secretKey
|
||||
resources:
|
||||
limits:
|
||||
cpu: "2"
|
||||
ephemeral-storage: 1Gi
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 50m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- name: baserow-data
|
||||
mountPath: /baserow/data
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/_health/
|
||||
port: 80
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: "{{ .domain }}"
|
||||
initialDelaySeconds: 300
|
||||
timeoutSeconds: 10
|
||||
periodSeconds: 30
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/_health/
|
||||
port: 80
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: "{{ .domain }}"
|
||||
initialDelaySeconds: 120
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 15
|
||||
failureThreshold: 6
|
||||
volumes:
|
||||
- name: baserow-data
|
||||
persistentVolumeClaim:
|
||||
claimName: baserow-data
|
||||
restartPolicy: Always
|
||||
26
baserow/versions/2/ingress.yaml
Normal file
26
baserow/versions/2/ingress.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: baserow
|
||||
namespace: {{ .namespace }}
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: {{ .externalDnsDomain }}
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: {{ .domain }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: baserow
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .domain }}
|
||||
secretName: {{ .tlsSecretName }}
|
||||
16
baserow/versions/2/kustomization.yaml
Normal file
16
baserow/versions/2/kustomization.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: {{ .namespace }}
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app: baserow
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
- pvc.yaml
|
||||
- db-init-job.yaml
|
||||
23
baserow/versions/2/manifest.yaml
Normal file
23
baserow/versions/2/manifest.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: 2.2.2-1
|
||||
requires:
|
||||
- name: postgres
|
||||
- name: redis
|
||||
defaultConfig:
|
||||
namespace: baserow
|
||||
externalDnsDomain: "{{ .cloud.domain }}"
|
||||
domain: baserow.{{ .cloud.domain }}
|
||||
tlsSecretName: wildcard-wild-cloud-tls
|
||||
storage: 2Gi
|
||||
db:
|
||||
host: "{{ .apps.postgres.host }}"
|
||||
port: "5432"
|
||||
name: baserow
|
||||
user: baserow
|
||||
redis:
|
||||
host: "{{ .apps.redis.host }}"
|
||||
defaultSecrets:
|
||||
- key: dbPassword
|
||||
- key: secretKey
|
||||
requiredSecrets:
|
||||
- postgres.password
|
||||
- redis.password
|
||||
4
baserow/versions/2/namespace.yaml
Normal file
4
baserow/versions/2/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ .namespace }}
|
||||
11
baserow/versions/2/pvc.yaml
Normal file
11
baserow/versions/2/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: baserow-data
|
||||
namespace: {{ .namespace }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .storage }}
|
||||
13
baserow/versions/2/service.yaml
Normal file
13
baserow/versions/2/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: baserow
|
||||
namespace: {{ .namespace }}
|
||||
spec:
|
||||
selector:
|
||||
component: web
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user