mirror of https://github.com/LemmyNet/lemmy
Merge branch 'zacanger-feat/k8s'
commit
f356a35884
@ -0,0 +1,48 @@
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: db
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: POSTGRES_DB
|
||||
value: lemmy
|
||||
- name: POSTGRES_PASSWORD
|
||||
# example: very-good-password
|
||||
value: CHANGE_ME
|
||||
- name: POSTGRES_USER
|
||||
value: lemmy
|
||||
image: postgres:12-alpine
|
||||
name: db
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: db
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: db
|
||||
persistentVolumeClaim:
|
||||
claimName: db
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: db
|
||||
name: db
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
@ -0,0 +1,46 @@
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: lemmy
|
||||
name: lemmy
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: lemmy
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: DATABASE_URL
|
||||
# example: 'postgres://lemmy:password@db:5432/lemmy'
|
||||
value: CHANGE_ME
|
||||
- name: HOSTNAME
|
||||
# example: 'lemmy.example.com'
|
||||
value: CHANGE_ME
|
||||
- name: JWT_SECRET
|
||||
# example: 'very-super-good-secret'
|
||||
value: CHANGE_ME
|
||||
- name: LEMMY_FRONT_END_DIR
|
||||
value: /app/dist
|
||||
image: dessalines/lemmy:v0.2.0.1
|
||||
name: lemmy
|
||||
ports:
|
||||
- containerPort: 8536
|
||||
restartPolicy: Always
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: lemmy
|
||||
name: lemmy
|
||||
spec:
|
||||
ports:
|
||||
- name: "8536"
|
||||
port: 8536
|
||||
targetPort: 8536
|
||||
selector:
|
||||
lemmy.service: lemmy
|
@ -0,0 +1,57 @@
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: pictshare
|
||||
name: pictshare
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: pictshare
|
||||
spec:
|
||||
containers:
|
||||
- image: hascheksolutions/pictshare:latest
|
||||
name: pictshare
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/nginx/html/data
|
||||
name: pictshare
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: pictshare
|
||||
persistentVolumeClaim:
|
||||
claimName: pictshare
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: pictshare
|
||||
name: pictshare
|
||||
spec:
|
||||
ports:
|
||||
- name: "8537"
|
||||
port: 8537
|
||||
targetPort: 80
|
||||
selector:
|
||||
lemmy.service: pictshare
|
||||
status:
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
lemmy.service: pictshare
|
||||
name: pictshare
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
Loading…
Reference in New Issue