kind: Deployment
apiVersion: apps/v1
metadata:
  name: galaxy-web-deploy
  labels:
    app: galaxy
    tier: web
spec:
  replicas: 1
  selector:
    matchLabels:
      app: galaxy
      tier: web
  template:
    metadata:
      labels:
        app: galaxy
        tier: web
    spec:
      volumes: 
      - name: galaxy-data
        persistentVolumeClaim:
          claimName: galaxy-pvc
      initContainers:
      - name: init-gpsql
        image: alpine:3.7
        command: ['sh', '-c', 'until nc -z -w3 gpsql 5432; do echo waiting for gpsql service; sleep 1; done;']
      containers:
      - name: galaxy-web-container
        image: "galaxy:dbpass"
        imagePullPolicy: "IfNotPresent"
        ports:
        - containerPort: 8080
        command: ["/galaxy/server/.venv/bin/uwsgi"]
        args: ["--yaml", "/galaxy/server/config/galaxy.yml"]
        volumeMounts:
        - name: galaxy-data
          mountPath: "/galaxy/server/database/"
