lemmy/server/stack.dev.yaml

112 lines
2.1 KiB
YAML
Raw Normal View History

2019-04-26 17:39:21 -04:00
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: 256Mi
cpu: 512m
2019-04-26 17:39:21 -04:00
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-server--dev
2019-04-26 17:39:21 -04:00
data:
LEMMY_FRONT_END_DIR: /opt/lemmy/ui--dev/dist # not actually used here, polyfill for monolith
2019-04-26 17:39:21 -04:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: lemmy-server--dev
2019-04-26 17:39:21 -04:00
spec:
selector:
matchLabels:
app: lemmy-server--dev
2019-04-26 17:39:21 -04:00
template:
metadata:
labels:
app: lemmy-server--dev
2019-04-26 17:39:21 -04:00
spec:
containers:
- name: lemmy-server--dev
image: registry.gitlab.com/pojntfx/lemmy/server.dev
2019-04-26 17:39:21 -04:00
envFrom:
- configMapRef:
name: postgres
- configMapRef:
name: lemmy-server--dev
2019-04-26 17:39:21 -04:00
resources:
limits:
memory: 512Mi
cpu: 512m
2019-04-26 17:39:21 -04:00
ports:
- containerPort: 8536
---
apiVersion: v1
kind: Service
metadata:
name: lemmy-server--dev
2019-04-26 17:39:21 -04:00
spec:
type: NodePort
selector:
app: lemmy-server--dev
2019-04-26 17:39:21 -04:00
ports:
- port: 8536
nodePort: 30001