Skip to content

Latest commit

 

History

History
48 lines (44 loc) · 4.38 KB

INSTALLwPortDFile.md

File metadata and controls

48 lines (44 loc) · 4.38 KB

Deploy using Portainer with Dockerfile

This is for those who can't (or don't want to) use the pre-built images from Dockerhub. For example you may have an architecture for which there is no image on Dockerhub.

It is assumed that Docker and Portainer are already setup and working.

i. Login to your Portainer instance. Select the Environment where the deployment will be made

ii. Select the 'Volumes' link from the left menu. Click the blue '+ Add volume' button. In the Create volume page, enter tesla_ble_mqtt in the Name field and press the blue 'Create the volume' button:

image

iii. Select the 'Images' link from the left menu. Click the blue '+ Build a new image' button. In the 'Build image' page, enter tesla_ble_mqtt in the Name field. Select the 'URL. Specify a URL to a file' button in the Build method section. Enter https://github.com/tesla-local-control/tesla_ble_mqtt_docker.git#main in the URL field. Click the blue 'Build the image' button. Note this can take some time on slower machines, e.g. 60mins+ on a RPi1b

image

iv. When the build has completed, the Output tab on the 'Build image' page will display 'No build output available. Select the 'Images' link from the left menu, an image with tag 'tesla_ble_mqtt:latest' should be visible in the 'Image list' page: image

v. Select the 'Stacks' link from the left menu. Click the blue '+ Add Stack' button. In the 'Create stack' page, enter tesla_ble_mqtt in the Name field. Copy and Paste the contents of docker-compose.yml into the Web editor box.

You must change the line image: "iainbullock/tesla_ble_mqtt:latest" to image: "tesla_ble_mqtt:latest"

image

vi. Scroll further down the Create stack page. In the Environment variables section press the blue Advanced Mode link:

image

vii. A box to enter environment variables will open up. Copy and Paste the contents of stack.env into the box, and press the blue 'Deploy the stack' button:

image image

viii. After some time, if all is well, the message 'Success. Stack successfully deployed' will briefly pop-up, and you will be returned to the 'Stacks list' page. Click the newly created tesla_ble_mqtt stack to enter the 'Stack details' page for the new stack. Click the red 'Stop this stack' button, then click the 'Editor' tab:

image

ix. Scroll down to the 'Environment variables' section. Enter the values required for your setup in the respective fields and when completed press the 'Update the stack' button. Use stack.env as a reference

image

x. If all is well, the message 'Success. Stack successfully deployed' will briefly pop-up, and you will be returned to the 'Stacks list' page. Click the tesla_ble_mqtt stack to enter the 'Stack details' page for the new stack. In the Containers section click the tesla_ble_mqtt container to enter the 'Container details' page. From here you can view the logs by pressing the Logs link in the 'Container status' section. Succesful logs look something like this at startup:

image