- docker >= 17.12.0+
- docker-compose
-
Install docker-compose on the docker host.
-
Clone this repo on the docker host.
-
Navigate to the directory,
cd homeassistant -
Use configuration and update the variables in .env file.
mv .env-template .env nano .env
-
Run the following command from the root:
docker-compose up -d
-
To stop the app, run the following command from the root of the cloned repo:
docker-compose down
-
Create a long-lived-token from HA and include the token in .env file under HA_TOKEN variable.
This Compose file contains the following environment variables:
| Variables | Default value |
|---|---|
| HA_IMAGE_VERSION | latest |
| HA_CONTAINER_NAME | home-assistant-container |
| HA_URL | http://localhost:8123 |
| HA_TOKEN | required |
| HA_MEDIA_PATH | ./media |
| CODE_SERVER_IMAGE_VERSION | latest |
| CODE_SERVER_CONTAINER_NAME | vscode-server-container |
| CODE_SERVER_PUID | 1000 |
| CODE_SERVER_PGID | 1000 |
| CODE_SERVER_TZ | Asia/Kuala_Lumpur |
| CODE_SERVER_PASSWORD | administrator |
| EXTERNAL_NETWORK | homelab-local |