114 lines
2 KiB
YAML
114 lines
2 KiB
YAML
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: postgres
|
||
|
data:
|
||
|
POSTGRES_PASSWORD: rrr
|
||
|
POSTGRES_USER: rrr
|
||
|
POSTGRES_DB: rrr
|
||
|
PGDATA: /var/lib/postgresql/data/pgdata
|
||
|
DATABASE_URL: postgres://rrr:rrr@postgres:5432/rrr
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: postgres
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 5Gi
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: postgres
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: postgres
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: postgres
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: postgres
|
||
|
image: postgres:11.2-alpine
|
||
|
resources:
|
||
|
limits:
|
||
|
memory: 128Mi
|
||
|
cpu: 500m
|
||
|
ports:
|
||
|
- containerPort: 5432
|
||
|
envFrom:
|
||
|
- configMapRef:
|
||
|
name: postgres
|
||
|
volumeMounts:
|
||
|
- name: postgres
|
||
|
mountPath: /var/lib/postgresql/data
|
||
|
volumes:
|
||
|
- name: postgres
|
||
|
persistentVolumeClaim:
|
||
|
claimName: postgres
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: postgres
|
||
|
spec:
|
||
|
selector:
|
||
|
app: postgres
|
||
|
ports:
|
||
|
- port: 5432
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: lemmy
|
||
|
data:
|
||
|
LEMMY_FRONT_END_DIR: /app/dist
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: lemmy
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: lemmy
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: lemmy
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: lemmy
|
||
|
command:
|
||
|
- /bin/sh -c /app/lemmy
|
||
|
envFrom:
|
||
|
- configMapRef:
|
||
|
name: lemmy
|
||
|
- configMapRef:
|
||
|
name: postgres
|
||
|
image: registry.gitlab.com/pojntfx/lemmy/lemmy
|
||
|
resources:
|
||
|
limits:
|
||
|
memory: 128Mi
|
||
|
cpu: 500m
|
||
|
ports:
|
||
|
- containerPort: 8536
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: lemmy
|
||
|
spec:
|
||
|
type: NodePort
|
||
|
selector:
|
||
|
app: lemmy
|
||
|
ports:
|
||
|
- port: 8536
|
||
|
nodePort: 30001
|