Files
AdventureLog/k8s/base/adventurelog.yaml
Sean Morley d22c55e182 Refactor deployment configurations and update documentation
- Replaced the All-in-One (AIO) deployment setup with a Standard Deployment configuration, introducing .env.advanced.example for advanced settings.
- Updated .dockerignore to reflect the new environment file structure.
- Removed .env.aio.example and associated references from documentation and workflows.
- Enhanced installation instructions to clarify the new Standard Deployment process.
- Updated GitHub Actions workflows to align with the new deployment structure, including smoke tests and image builds.
- Improved documentation for environment variable references and deployment options.
2026-06-12 21:49:01 -04:00

165 lines
3.6 KiB
YAML

apiVersion: v1
kind: Secret
metadata:
name: adventurelog-secret
type: Opaque
stringData:
postgres-password: change-me
django-secret-key: change-me-to-a-long-random-string
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: adventurelog-db-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: adventurelog-media-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: adventurelog-db
spec:
serviceName: adventurelog-db
replicas: 1
selector:
matchLabels:
app: adventurelog-db
template:
metadata:
labels:
app: adventurelog-db
spec:
containers:
- name: postgis
image: postgis/postgis:16-3.5
ports:
- containerPort: 5432
env:
- name: POSTGRES_DB
value: database
- name: POSTGRES_USER
value: adventure
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: adventurelog-secret
key: postgres-password
volumeMounts:
- name: db-data
mountPath: /var/lib/postgresql/data
readinessProbe:
exec:
command: ["pg_isready", "-U", "adventure", "-d", "database"]
initialDelaySeconds: 10
periodSeconds: 5
volumes:
- name: db-data
persistentVolumeClaim:
claimName: adventurelog-db-pvc
---
apiVersion: v1
kind: Service
metadata:
name: adventurelog-db
spec:
selector:
app: adventurelog-db
ports:
- name: postgres
port: 5432
targetPort: 5432
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: adventurelog
spec:
replicas: 1
selector:
matchLabels:
app: adventurelog
template:
metadata:
labels:
app: adventurelog
spec:
containers:
- name: app
image: ghcr.io/seanmorley15/adventurelog:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
env:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: adventurelog-secret
key: postgres-password
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: adventurelog-secret
key: django-secret-key
- name: PGHOST
value: adventurelog-db
- name: SITE_URL
value: https://adventurelog.example.com
volumeMounts:
- name: media
mountPath: /code/media
readinessProbe:
httpGet:
path: /health
port: 80
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
volumes:
- name: media
persistentVolumeClaim:
claimName: adventurelog-media-pvc
---
apiVersion: v1
kind: Service
metadata:
name: adventurelog
spec:
selector:
app: adventurelog
ports:
- name: http
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: adventurelog
spec:
rules:
- host: adventurelog.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: adventurelog
port:
number: 80