Skip to content

Commit

Permalink
add example docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdkleijn committed Jun 6, 2023
1 parent ec2f01d commit 9cf7d4d
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ jobs:
uses: softprops/[email protected]
with:
files: ./homedash-*
append_body: true
body: |
The container image for this release is available from ghcr.io/mvdkleijn/homedash
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ Features include:

Keep in mind that this is intended for local usage, so there are no provisions for authentication, etc.

## Support
## Usage

Supported Go versions, see: https://endoflife.date/go
Supported architectures: amd64, arm64
1) Start HomeDash by either running the container or just starting the binary;
2) Feed your HomeDash installation using either:
- the [sidecar application](https://github.com/mvdkleijn/homedash-sidecar) or;
- the REST API, see http://localhost:8080/static/docs/ for details.
3) Go to http://localhost:8080/ to view the dashboard. (or whatever URL you host it on)

Source code and issues: https://github.com/mvdkleijn/homedash
An example docker-compose.yml file is included in the root of this git repository. The example assumes you use Traefik and something like https://github.com/tecnativa/docker-socket-proxy so adjust where needed for your situation.

## Configuration

Expand Down Expand Up @@ -72,12 +75,12 @@ All environment variables **must** be prefixed by "HOMEDASH_".
| CORS_ALLOWEDORIGINS | cors: allowedorigins: | Origins of requests allowed by CORS | "*" |
| CORS_ALLOWCREDENTIALS | cors: allowcredentials: | Allow user credentials as part of request to server | false |

## Usage
## Support

1) Feed your HomeDash installation using either:
- the [sidecar application](https://github.com/mvdkleijn/homedash-sidecar) or;
- the REST API, see http://localhost:8080/static/docs/ for details.
2) Go to http://localhost:8080/ to view the dashboard. (or whatever URL you host it on)
Supported Go versions, see: https://endoflife.date/go
Supported architectures: amd64, arm64

Source code and issues: https://github.com/mvdkleijn/homedash

## Licensing

Expand Down
42 changes: 42 additions & 0 deletions docker-compose.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: "3"

networks:
traefik:
external: true

services:
server:
image: ghcr.io/mvdkleijn/homedash:latest
container_name: homedash
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
networks:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.homedash.entrypoints=web"
- "traefik.http.routers.homedash.rule=Host(`dash.example.com`)"
- "traefik.http.services.homedash.loadbalancer.server.port=8080"
- "homedash.name=HomeDash"
- "homedash.url=https://dash.example.com"
- "homedash.icon=homedash"

sidecar:
image: ghcr.io/mvdkleijn/homedash-sidecar:latest
container_name: homedash-sidecar
environment:
- USER_UID=1000
- USER_GID=1000
- HOMEDASH_SERVER=http://dash.example.com
- DOCKER_HOST=http://host.docker.internal:2375
restart: always
network_mode: host
extra_hosts:
- "host.docker.internal:host-gateway"
labels:
- "traefik.enable=false"
depends_on:
server:
condition: service_healthy

0 comments on commit 9cf7d4d

Please sign in to comment.