diff --git a/dsmr/dsmr.yml b/dsmr/dsmr.yml new file mode 100644 index 0000000..e3a40b6 --- /dev/null +++ b/dsmr/dsmr.yml @@ -0,0 +1,40 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dsmr + labels: + app: dsmr +spec: + replicas: 1 + selector: + matchLabels: + app: dsmr + template: + metadata: + labels: + app: dsmr + spec: + containers: + - name: dsmr + image: xirixiz/dsmr-reader-docker:latest + env: + - name: TZ + value: "Europe/Amsterdam" + - name: VIRTUAL_HOST + value: "localhost" + - name: DJANGO_DATABASE_HOST + value: "postgres-postgresql" + - name: DJANGO_DATABASE_USER + value: "dsmr" + - name: DJANGO_DATABASE_PASSWORD + value: "iWoo5Paa3johPhooshah" + - name: DJANGO_DATABASE_NAME + value: "dsmr" + - name: DJANGO_DATABASE_ENGINE + value: django.db.backends.postgresql + - name: DSMRREADER_REMOTE_DATALOGGER_MODE + value: standalone + - name: SECRET_KEY + value: "ohB8oogh6livaeyingoo" + ports: + - containerPort: 7777 diff --git a/dsmr/loadbalancer_service.yml b/dsmr/loadbalancer_service.yml new file mode 100644 index 0000000..8dbf5bb --- /dev/null +++ b/dsmr/loadbalancer_service.yml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: dsmr +spec: + selector: + app: dsmr + ports: + - port: 80 + targetPort: 80 + type: LoadBalancer diff --git a/dsmr/servicedsmr.yml b/dsmr/servicedsmr.yml new file mode 100644 index 0000000..70d1808 --- /dev/null +++ b/dsmr/servicedsmr.yml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: dsmr + name: dsmr +spec: + ports: + - nodePort: 30500 + port: 80 + protocol: TCP + targetPort: 80 + selector: + app: dsmr + type: NodePort