apiVersion: v1
kind: ReplicationController
metadata:
  name: portal-v1
  labels:
    app: portal
    version: "1"
    tier: frontend
spec:
  replicas: 2
  selector:
    app: portal
    version: "1"
  template:
    metadata:
      labels:
        app: portal
        version: "1"
        tier: frontend
    spec:
      containers:
      - name: portal
#       FOR DEPLOY FROM DOCKERHUB
#        image: portal:17
        image: magnuslarsson/portal.js:1
        env:
        - name: GET_HOSTS_FROM
          value: dns
        ports:
        - name: http
          containerPort: 80
        livenessProbe:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 20
          timeoutSeconds: 1
