VSCode Torizon Autostart QT Widget App

I have a QT widget App created with VSCode torizon plugin and running on Apalis Imx8. It works fine and use weston-vivante container.

How I need to configure both containers (App and weston-vivante) to autostart on a production environment? I try to change the restart policy from portainer to “unless stopped” but container App accept the change but weston-vivante container give me an error when:

  1. Stop App and weston-vivante containers from portainer.
  2. Enter to weston-vivante container from portainer and push to duplicate/edit
  3. Change restar policy to “unless stopped”
  4. Push to deploy container to save the change
  5. I get an error “Duplicate mount point:/tmp”

image

How can I autostart both containers? Could I setup this from VSCode?

Kind regards

Greetings @delta,

If you want to create a production image of TorizonCore that autostarts your containers then you want to look at TorizonCore Builder rather than our IDE extensions.

Please take a look at this article here: Pre-provisioning Docker Containers onto a TorizonCore image | Toradex Developer Center

Best Regards,
Jeremias

Thanks @jeremias.tx , at this moment I need to change everyday the Code ( not is a real production scheme) but I need that both containers autostart, It is not possible?

In that case you can just place your docker-compose.yml in this location on the device’s filesystem: /var/sota/storage/docker-compose/docker-compose.yml.

We have a systemd service that runs docker-compose up on any docker-compose.yml in that file location. This is how we autostart the evaluation containers on the TorizonCore image. Mind you this autostarting happens on boot.

Of course you’ll still need to transfer your container images to the device itself. For actual production you can then use the the TorizonCore Builder method I mentioned previously.

Best Regards,
Jeremias

Thanks @jeremias.tx, finally I changed via portainer on stacks the parameter “RESTART POLICIES” to unless stopped for both containers ( weston-vivante and App) and it works fine every restart.

Best regards

Glad to hear everything is working fine for you now.

Best Regards,
Jeremias