mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
Cleanup and additions for docker on windows. (#1555)
Fixed spacing on the Timezone block. Updated so configuration is move clear. Added commands for docker on windows.
This commit is contained in:
parent
60d635330f
commit
0d957795b2
@ -36,19 +36,26 @@ $ cd hadashboard
|
||||
$ docker build -t hadashboard .
|
||||
```
|
||||
|
||||
When the build completes, you can run the dashboard with:
|
||||
When the build completes, you can run the dashboard with the following command for unix based systems:
|
||||
|
||||
```bash
|
||||
$ docker run --name="hadashboard" -d -v <path_to_hadashboard>/dashboards:/app/dashboards -v <path_to_hadashboard>/lib/ha_conf.rb:/app/lib/ha_conf.rb -v <path_to_hadashboard>/hapush:/app/hapush --net=host hadashboard
|
||||
```
|
||||
|
||||
If you are running docker on windows you should not use the `--net` command and explicitly specify the port, aslo for security reason `--net=host` should not be used so the following can also be used in unix. This will also set the process to start when the docker process starts so you do not have to worry about reboots. To map the volumes make sure you have ticked the shred drives in the settings. In this example I am using `c:\hadashboard` as the location where the git clone was done and mapping to port 3030 on the host.
|
||||
|
||||
```powershell
|
||||
docker run --restart=always --name="hadashboard" -p 3030:3030 -d -v C:/hadashboard/dashboards:/app/dashboards -v C:/hadashboard/lib/ha_conf.rb:/app/lib/ha_conf.rb -v C:/hadashboard/hapush:/app/hapush hadashboard
|
||||
```
|
||||
|
||||
This will use all of the same configuration files as specified below in the configuration sections, although you will need to make a few changes to the `hapush` configuration to match the docker's filesystem, detailed below.
|
||||
|
||||
By default, the docker instance should pick up your timezone but if you want to explicitly set it you can add an environment variable for your specific zone as follows:
|
||||
|
||||
```
|
||||
-e "TZ=Europe/Amsterdam"
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
### Docker on Raspberry Pi
|
||||
|
||||
@ -111,6 +118,8 @@ You will need to research what works on your particular architecture and also be
|
||||
|
||||
Note: This is currently running on various versions of Ruby and there are no strong dependencies however your mileage may vary.
|
||||
|
||||
## Updating configuration (Manual and Docker)
|
||||
|
||||
Next, in the `./lib` directory, copy the ha_conf.rb.example file to ha_conf.rb and edit its settings to reflect your installation, pointing to the machine Home Assistant is running on and adding your api_key.
|
||||
|
||||
```ruby
|
||||
@ -130,12 +139,12 @@ $news_feeds = {
|
||||
}
|
||||
```
|
||||
|
||||
You can leave these alone for now or if you prefer customize them as described in the News widget section below.
|
||||
You can leave these alone for now or if you prefer customize them as described in the News widget section.
|
||||
|
||||
When you are done, you can start a local webserver like this:
|
||||
When you are done, you can start a local webserver like this or if you are on docker it should start when you start the container.
|
||||
|
||||
``` bash
|
||||
$ dashing start
|
||||
```
|
||||
|
||||
Point your browser to **http://localhost:3030** to access the hadashboard on your local machine.and you should see the supplied default dashboard.
|
||||
Point your browser to **http://localhost:3030** to access the hadashboard on your local machine.and you should see the supplied default dashboard. If you want to access it remotely ensure you have opened any required firewall rules.
|
||||
|
Loading…
x
Reference in New Issue
Block a user