apiVersion: apps/v1
kind: Deployment
metadata:
  name: wikijs
  namespace: wiki
  labels:
    app-name: wikijs
    version: "${WIKIJS_VERSION}"
    component: project-management-tool
    hostNetwork: "no"
    internal-service: "yes"
    managed-by: chynten
    created-by: chynten
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app-name: wikijs
  template:
    metadata:
      labels:
        app-name: wikijs
    spec:
      containers:
      - name: wikijs
        image: ${WIKIJS_IMAGE}:${WIKIJS_VERSION}
        imagePullPolicy: IfNotPresent
        env:
        - name: DB_TYPE
          value: "mysql"
        - name: DB_HOST
          value: "mysql-svc.mysql.svc.cluster.local"
        - name: DB_PORT
          value: "3306"
        - name: DB_USER
          value: "wikijs"
        - name: DB_PASS
          value: "$WIKIJS_PASSWORD"
        - name: DB_NAME
          value: "wikijs"