Synpse
🤖 Devices⚡ ApplicationsTry Synpse!
  • Intro to Synpse
  • Start here
    • Quick Start (web user)
    • Quick Start (CLI)
  • Agent
    • Install
      • Raspberry Pi
      • Linux (Docker)
      • MacOS
      • NVIDIA Jetson
      • Headless (Ubuntu)
      • BeagleBoard AI
      • Bulk Provisioning
      • 🪄Beta - Universal Synpse image
      • Containerized agent
      • Configuration
    • Uninstall
  • CLI
    • Install & Usage
  • synpse core
    • Devices
      • Device Provisioning
      • HTTPS Tunnel Access
      • SSH Access
      • Device Labels
      • Environment Variables
      • Proxy Application Ports
      • OS & Architectures
      • Operations
      • Device API
    • Applications
      • Deploy
      • Secrets
      • Environment variables
      • Substitution (dynamic templates)
      • Volumes
      • Networking
      • Scheduling
      • Registry authentication
      • Using GPUs
      • Tips & Tricks
      • Logs and status
      • Application specification (API reference)
    • Account
      • Personal Access Tokens
      • Service (Robot) Accounts
      • Teams (Share Devices)
    • Monitoring (beta)
      • Device Monitoring
      • Application Monitoring
  • Manage
    • Projects
    • Namespaces
    • Quotas
  • Examples
    • 🏠Home Automation
      • Gladys Assistant
      • Home Assistant
    • 🛠️Preparing OS Images
      • Synpse CLI Builder
      • Build a custom Raspberry Pi image
      • Cloud-init (advanced)
    • 💡Dynamic Templates
    • ☁️Public Cloud IoT
      • AWS IoT Core
      • Azure IoT Hub
      • GCP IoT Core
    • 🚀Device management
      • VNC to remove devices
      • Ansible
  • On-prem Deployment
    • 🐳Docker Compose
    • 🌤️kubernetes
  • Resources
    • API Documentation
    • Deployment patterns
    • Security & Tech
Powered by GitBook
On this page
  • Overview
  • Using volumes
  • Mounting files

Was this helpful?

  1. synpse core
  2. Applications

Volumes

Synpse can mount volumes from the host. Volumes can be used to share data between the containers or persist data so it survives container restart.

PreviousSubstitution (dynamic templates)NextNetworking

Last updated 4 years ago

Was this helpful?

Overview

Volumes are the preferred mechanism for persisting data generated by and used by Docker containers. While are dependent on the directory structure and OS of the host machine, volumes are completely managed by Docker.

Using volumes

Volumes are defines as part of your application specification, where /tmp/redis is host location and /data is inside the container.

name: redis
description: Redis example
type: container
scheduling:
  type: AllDevices
spec:
  containers:
  - name: redis
    image: docker.io/redis:latest
    networkMode: host
    volumes:
    - /tmp/redis:/data

Mounting files

Many applications rely on certain files to be up-to-date from the host machine. You can mount them directly to the container:

name: homeassistant
description: Homeassistant master
scheduling:
  type: Conditional
  selectors:
    homeassistant: master
spec:
  containers:
    - name: homeassistant
      image: docker.io/homeassistant/raspberrypi4-homeassistant:stable
      networkMode: host
      volumes:
        - /usr/homeassistant:/config
        - /etc/localtime:/etc/localtime

bind mounts