apiVersion: v1
kind: ReplicationController
metadata:
  labels:
    name: web
  name: web-controller
spec:
  replicas: 1
  selector:
    name: web
  template:
    metadata:
      labels:
        name: web
    spec:
      containers:
      - image: ybga/lucida_cmd
        command: ['/bin/sh', '-c']
        # Modify the domain name (but leave the port number unchanged).
        args: ['export ASR_ADDR_PORT=wss://clarity13.eecs.umich.edu:30001 && sudo a2enmod ssl && env > envs.txt && sudo chown -R www-data:www-data /usr/local/lucida && sudo /usr/sbin/apache2ctl -D FOREGROUND']
        name: web
        ports:
        - containerPort: 443
          name: http-server
        volumeMounts:
          - mountPath: /etc/letsencrypt/live/host
            name: web-ssl
            readOnly: false
      volumes:
        - hostPath:
            # Modify it to be the path to your SSL certificates generated by letsencrypt.
            # Make sure the following files exist in that path: cert1.pem, privkey1.pem, and chain1.pem.
            path: /etc/letsencrypt/archive/clarity13.eecs.umich.edu
          name: web-ssl
