Update shellhttpd Application¶
The previous section, Dynamic Configuration File, shows how to
send configuration files using fioctl
. The section also shows where the file
is located on the device: /var/run/secrets/shellhttpd.conf
The shellhttpd
application is not using this file yet.
This section shows how to modify the docker-compose.yml
file so that the application will
use the host machine’s /var/run/secrets/shellhttpd.conf
file instead of a configuration file built
into the container.
Let’s start by changing the Dockerfile
. Remove the addition of the
shellhttpd.conf
file to simplify your application:
shellhttpd/Dockerfile:
Edit docker-compose.yml
and change the volumes
stanza to share the /var/run/secrets
folder.
shellhttpd/docker-compose.yml:
Check your changes, add, commit and push to the server:
Make sure you received your update by checking the latest Target on the Devices tab in your Factory.
Once you receive the update, the docker log should show the new message configured with fioctl
in the previous section:
Example Output:
If you test the application with curl
, it will also display the new message:
Example Output:
Let’s repeat the fioctl config
command used in the previous section, and confirm
that everything is working.
Update the configuration file using fioctl
in your host machine:
Wait and test your application again:
Example Output: