mirror of
https://github.com/lukevella/rallly-selfhosted.git
synced 2025-12-10 02:42:49 +01:00
Compare commits
1 Commits
9ec9c46792
...
2e79c12f92
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e79c12f92 |
@ -10,20 +10,19 @@ This directory contains base Kubernetes manifests to self-host Rallly. It separa
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
1. **Secrets (`secrets.yaml`):**
|
1. **Secrets (`secrets.yaml`):**
|
||||||
- **Important:** Do not commit the `secrets.yaml` file with real credentials to version control. Consider adding `secrets.yaml` to your `.gitignore` file to prevent accidental commits.
|
- **Important:** Do not commit the `secrets.yaml` file with real credentials to version control.
|
||||||
- Update `POSTGRES_PASSWORD` and `SECRET_PASSWORD` (use `openssl rand -hex 32` to generate).
|
- Update `POSTGRES_PASSWORD` and `SECRET_PASSWORD` (use `openssl rand -hex 32` to generate).
|
||||||
- **Critical:** Ensure the password in `DATABASE_URL` matches `POSTGRES_PASSWORD`. Both must use the same value.
|
- **Critical:** Ensure the password in `DATABASE_URL` matches `POSTGRES_PASSWORD`. Both must use the same value.
|
||||||
- **Format:** The `DATABASE_URL` format should look like this: `postgres://<user>:<password>@<postgres-service-name>:5432/<db-name>`.
|
|
||||||
|
|
||||||
2. **Config (`rallly-config.yaml`):**
|
2. **Config (`rallly-config.yaml`):**
|
||||||
- Update `NEXT_PUBLIC_BASE_URL` to match your domain.
|
- Update `NEXT_PUBLIC_BASE_URL` to match your domain.
|
||||||
- Configure your SMTP settings for emails.
|
- Configure your SMTP settings for emails.
|
||||||
|
|
||||||
3. **Ingress (`ingress.yaml`):**
|
3. **Ingress (`ingress.yaml`):**
|
||||||
- Change `host: rallly.example.com` to your actual domain.
|
- Change `host: rallly.example.com` to your actual domain.
|
||||||
- Ensure `ingressClassName` matches your cluster's controller (default is set to `nginx`).
|
- Ensure `ingressClassName` matches your cluster's controller (default is set to `nginx`).
|
||||||
- **TLS:** Create the TLS certificate Secret named `rallly-tls` or enable cert-manager (see comments in `ingress.yaml` for options).
|
- **TLS:** Create the TLS certificate Secret named `rallly-tls` or enable cert-manager (see comments in `ingress.yaml` for options).
|
||||||
|
|
||||||
## Deployment Order
|
## Deployment Order
|
||||||
|
|
||||||
@ -37,9 +36,6 @@ kubectl apply -f rallly-config.yaml
|
|||||||
# 2. Apply Database (StatefulSet)
|
# 2. Apply Database (StatefulSet)
|
||||||
kubectl apply -f postgres.yaml
|
kubectl apply -f postgres.yaml
|
||||||
|
|
||||||
# Wait for database to be ready
|
|
||||||
kubectl wait --for=condition=ready pod -l app=postgres --timeout=300s
|
|
||||||
|
|
||||||
# 3. Apply Application (Deployment)
|
# 3. Apply Application (Deployment)
|
||||||
kubectl apply -f rallly.yaml
|
kubectl apply -f rallly.yaml
|
||||||
|
|
||||||
@ -47,14 +43,6 @@ kubectl apply -f rallly.yaml
|
|||||||
kubectl apply -f ingress.yaml
|
kubectl apply -f ingress.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** If you update `secrets.yaml` or `rallly-config.yaml` _after_ deployment, you must restart the Rallly pods for changes to take effect:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl rollout restart deployment rallly
|
|
||||||
```
|
|
||||||
|
|
||||||
This performs a **rolling restart**, so there will be no downtime. However, ensure the new configuration is valid; if pods fail to start, check the logs with `kubectl logs -f deployment/rallly`.
|
|
||||||
|
|
||||||
## Verification
|
## Verification
|
||||||
|
|
||||||
Check that the pods are running:
|
Check that the pods are running:
|
||||||
@ -67,14 +55,4 @@ The Postgres pod should show `1/1 Running` and the Rallly pod should eventually
|
|||||||
|
|
||||||
## Notes on Storage
|
## Notes on Storage
|
||||||
|
|
||||||
The PostgreSQL StatefulSet requests a 1Gi PersistentVolume. Ensure your cluster has a default StorageClass configured, or update the `volumeClaimTemplates` in `postgres.yaml` to specify a StorageClass. If no StorageClass is available, the PersistentVolumeClaim will remain pending and the postgres pod will not start. Check your cluster's available StorageClasses with `kubectl get storageclass`.
|
The PostgreSQL StatefulSet requests a 1Gi PersistentVolume. Ensure your cluster has a default StorageClass configured, or update the `volumeClaimTemplates` in `postgres.yaml` to specify a StorageClass.
|
||||||
|
|
||||||
## Notes on Backups
|
|
||||||
|
|
||||||
For production deployments, implement regular PostgreSQL backups. Consider using:
|
|
||||||
|
|
||||||
- Kubernetes-native backup tools (e.g., Velero)
|
|
||||||
- Scheduled pg_dump jobs within the cluster
|
|
||||||
- Cloud-provider managed backups (if using managed K8s)
|
|
||||||
|
|
||||||
Refer to your cluster provider's backup documentation for recommendations.
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ spec:
|
|||||||
app: rallly
|
app: rallly
|
||||||
strategy:
|
strategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
# Zero-downtime deployment strategy
|
# Zero-donwtime deployment strategy
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
maxUnavailable: 0
|
maxUnavailable: 0
|
||||||
maxSurge: 1
|
maxSurge: 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user