Deploy Application deployment is how you interact with your edge devices. Develop, run and manage your applications
Applications in Synpse can contain one or more Docker containers. These containers can easily talk to each other and utilise all the regular Docker features that you are used to.
You can view a bunch of sample applications that are available here https://github.com/synpse-hq/synpse for inspiration. If you wish to deploy some specific app but not sure how, please drop us an email at hello@synpse.net or join our Discord channel and we will help you out! 💡
CLI
To deploy first application use synpse application create
CLI command.
Copy synpse application create hello \
--image= "quay.io/synpse/hello-synpse-go:latest"
To create or update an application from file use -f
flag provide either URL or file location locally
Copy synpse deploy \
-f https://raw.githubusercontent.com/synpse-hq/hello-synpse-go/main/hello.yaml
where application spec file is yaml
file:
Copy name : hello-synpse
scheduling :
type : AllDevices
spec :
containers :
- name : hello
image : quay.io/synpse/hello-synpse-go:latest
ports :
- 8090:8090
Examples
If you mapping docker run
command into Synpse, this part will help you to understand mapping for the arguments
Example 1
Volumes and environment variables
Copy sudo docker run --restart always -d --name homeassistant \
-v /PATH_TO_YOUR_CONFIG:/config --device=/PATH_TO_YOUR_USB_STICK \
-e TZ=Australia/Melbourne --net=host \
ghcr.io/home-assistant/home-assistant:stable
Will translate to:
Copy name : hassio
description : HASS
scheduling :
type : AllDevices
spec :
containers :
- name : homeassistant
image : ghcr.io/home-assistant/home-assistant:stable
networkMode : host
volumes :
-/PATH_TO_YOUR_CONFIG:/config
- /etc/localtime:/etc/localtime
env :
- name : TZ
value : Australia/Melbourne
devices :
- hostPath : /PATH_TO_YOUR_USB_STICK
containerPath : /PATH_TO_YOUR_USB_STICK
restartPolicy :
name : always
Example 2
A more complex command with arguments:
Copy docker run -d -p 12101:12101 \
--restart unless-stopped \
-v "$HOME/.config/rhasspy/profiles:/profiles" \
--device /dev/snd:/dev/snd \
synesthesiam/rhasspy-server:latest \
--user-profiles /profiles \
--profile en
Will translate to:
Copy name : Rhasspy deployment
description : Rhasspy open source voice assistant application deployment.
scheduling :
type : AllDevices
spec :
containers :
- name : rhass
image : synesthesiam/rhasspy-server:latest
args :
- --profile
- en
- --user-profiles
- /profiles
devices :
- hostPath : /dev/snd
containerPath : /dev/snd
ports :
- 12101:12101
volumes :
- /data/rhasspy/profiles:/profiles
restartPolicy :
name : unless-stopped
Example 3
Exec driver application running firefox in kiosk mode:
Copy name : firefox-kiosk-exec
description : FireFox Kiosk application
scheduling :
type : AllDevices
selectors : {}
spec :
execs :
- name : exec
command : firefox
args :
- https://synpse.net
env :
- name : DISPLAY
value : :0
restartPolicy : {}
Example 4
Exec driver with container in one application spec:
Copy name : firefox-kiosk-exec
description : FireFox Kiosk application
scheduling :
type : AllDevices
selectors : {}
spec :
containers :
- name : hello
image : quay.io/synpse/hello-synpse-go
forcePull : true
restartPolicy : {}
execs :
- name : exec
command : firefox
args :
- https://synpse.net
env :
- name : DISPLAY
value : :0
restartPolicy : {}