|
| 1 | +## How to run this example |
| 2 | +# |
| 3 | +# 1. Make sure you have Docker and Docker Compose installed. |
| 4 | +# 2. Run `docker compose up -d` in the directory containing this file. |
| 5 | +# 3. Configure your browser to access the Updatecli dashboard at `http://localhost:8080`. |
| 6 | +# 4. Run `updatecli udash login "http://localhost" --experimental` |
| 7 | +# 5. Run any updatecli command to publish reports to Udash |
| 8 | +# |
| 9 | +# INFO: You may have to run `docker compose restart server` if the postgresql database |
| 10 | +# wasn't ready to receive connection |
| 11 | +# |
| 12 | +# For example from the root of this repository, you can run: |
| 13 | +# 1. `export GITHUB_TOKEN=<your-github-token>` |
| 14 | +# 2. `export GITHUB_ACTOR=<your-github-username>` |
| 15 | +# 3. `docker login ghcr.io` to authenticate on the GitHub Container Registry for pullling Updatecli policies |
| 16 | +# 4. `updatecli compose diff --experimental` to execute Updatecli policies defined in the file `updatecli-compose.yaml` |
| 17 | + |
| 18 | +version: '3' |
| 19 | +services: |
| 20 | + db: |
| 21 | + image: postgres:17@sha256:8d3be35b184e70d81e54cbcbd3df3c0b47f37d06482c0dd1c140db5dbcc6a808 |
| 22 | + restart: always |
| 23 | + environment: |
| 24 | + - POSTGRES_USER=udash |
| 25 | + - POSTGRES_PASSWORD=password |
| 26 | + - POSTGRES_DB=udash |
| 27 | + ports: |
| 28 | + - 5432 |
| 29 | + |
| 30 | + server: |
| 31 | + image: ghcr.io/updatecli/udash:v0.10.0 |
| 32 | + command: server start |
| 33 | + environment: |
| 34 | + - GIN_MODE=release |
| 35 | + volumes: |
| 36 | + - "./udash/config.yaml:/home/udash/.udash/config.yaml" |
| 37 | + expose: |
| 38 | + - 8080 |
| 39 | + labels: |
| 40 | + - "traefik.enable=true" |
| 41 | + - "traefik.http.routers.traefik-server.service=server" |
| 42 | + - "traefik.http.services.server.loadbalancer.server.port=8080" |
| 43 | + - "traefik.http.routers.traefik-server.rule=PathPrefix(`/api/`)" |
| 44 | + |
| 45 | + front: |
| 46 | + image: ghcr.io/updatecli/udash-front:v0.10.1 |
| 47 | + expose: |
| 48 | + - 80 |
| 49 | + environment: |
| 50 | + - VUE_APP_AUTH_ENABLED=false |
| 51 | + volumes: |
| 52 | + - "./udash-front/config.js:/usr/share/nginx/html/config.js" |
| 53 | + - "./udash-front/config.json:/usr/share/nginx/html/config.json" |
| 54 | + labels: |
| 55 | + - "traefik.enable=true" |
| 56 | + - "traefik.http.routers.front.rule=PathPrefix(`/`)" |
| 57 | + - "traefik.http.routers.front.service=front" |
| 58 | + - "traefik.http.services.front.loadbalancer.server.port=80" |
| 59 | + |
| 60 | + traefik: |
| 61 | + image: "traefik:v3.0" |
| 62 | + container_name: "traefik" |
| 63 | + command: |
| 64 | + - "--api.insecure=true" |
| 65 | + - "--providers.docker=true" |
| 66 | + - "--providers.docker.exposedbydefault=false" |
| 67 | + - "--entrypoints.web.address=:80" |
| 68 | + ports: |
| 69 | + - "80:80" |
| 70 | + - "8080:8080" |
| 71 | + volumes: |
| 72 | + - "/var/run/docker.sock:/var/run/docker.sock:ro" |
0 commit comments