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 [email protected] or join our Discord channel and we will help you out!
πŸ’‘
​

CLI

To deploy first application use synpse application create CLI command.
1
synpse application create hello \
2
--image="quay.io/synpse/hello-synpse-go:latest"
Copied!
To create or update an application from file use -f flag provide either URL or file location locally
1
synpse deploy \
2
-f https://raw.githubusercontent.com/synpse-hq/hello-synpse-go/main/hello.yaml
Copied!
​where application spec file is yaml file:
1
name: hello-synpse
2
scheduling:
3
type: AllDevices
4
spec:
5
containers:
6
- name: hello
7
image: quay.io/synpse/hello-synpse-go:latest
8
ports:
9
- 8090:8090
Copied!

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
1
sudo docker run --restart always -d --name homeassistant \
2
-v /PATH_TO_YOUR_CONFIG:/config --device=/PATH_TO_YOUR_USB_STICK \
3
-e TZ=Australia/Melbourne --net=host \
4
ghcr.io/home-assistant/home-assistant:stable
Copied!
Will translate to:
1
name: hassio
2
description: HASS
3
scheduling:
4
type: AllDevices
5
spec:
6
containers:
7
- name: homeassistant
8
image: ghcr.io/home-assistant/home-assistant:stable
9
networkMode: host
10
volumes:
11
-/PATH_TO_YOUR_CONFIG:/config
12
- /etc/localtime:/etc/localtime
13
env:
14
- name: TZ
15
value: Australia/Melbourne
16
devices:
17
- hostPath: /PATH_TO_YOUR_USB_STICK
18
containerPath: /PATH_TO_YOUR_USB_STICK
19
restartPolicy:
20
name: always
Copied!

Example 2

A more complex command with arguments:
1
docker run -d -p 12101:12101 \
2
--restart unless-stopped \
3
-v "$HOME/.config/rhasspy/profiles:/profiles" \
4
--device /dev/snd:/dev/snd \
5
synesthesiam/rhasspy-server:latest \
6
--user-profiles /profiles \
7
--profile en
Copied!
Will translate to:
1
name: Rhasspy deployment
2
description: Rhasspy open source voice assistant application deployment.
3
scheduling:
4
type: AllDevices
5
spec:
6
containers:
7
- name: rhass
8
image: synesthesiam/rhasspy-server:latest
9
args:
10
- --profile
11
- en
12
- --user-profiles
13
- /profiles
14
devices:
15
- hostPath: /dev/snd
16
containerPath: /dev/snd
17
ports:
18
- 12101:12101
19
volumes:
20
- /data/rhasspy/profiles:/profiles
21
restartPolicy:
22
name: unless-stopped
Copied!