In case you use kubernetes...

kind: PersistentVolume
apiVersion: v1
metadata:
  name: myapi-pv-volume
  labels:
    type: local
spec:
  storageClassName: local-storage
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data/etcd"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: myapi-pv-claim
  labels:
    app: myapi
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapi
  labels:
    app: myapi
spec:
  replicas: 1
  selector:
    matchLabels:
      app: myapi
  template:
    metadata:
      labels:
        app: myapi
    spec:
      containers:
      - name: myapi
        imagePullPolicy: IfNotPresent
        image: myapi
        ports:
        - containerPort: 5000
          protocol: TCP
        volumeMounts:
        - name: myapi-vol
          mountPath: /var/lib/etcd
      volumes:
      - name: myapi-vol
        persistentVolumeClaim:
          claimName: myapi-pv-claim
---
apiVersion: v1
kind: Service
metadata:
  name: myapi
  labels:
    app: myapi
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 5000
  selector:
    app: myapi
  type: ClusterIP