Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Run one container per bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
dhpiggott committed Aug 11, 2024
1 parent d4eb227 commit edb4a7e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@ on:
SSH_USER:
description: "SSH user"
required: true
BRIDGE_API_KEY:
description: "Bridge API key"
BRIDGE_A_API_KEY:
description: "Bridge A API key"
required: true
BRIDGE_IP_ADDRESS:
description: "Bridge IP address"
BRIDGE_A_IP_ADDRESS:
description: "Bridge A IP address"
required: true
BRIDGE_B_API_KEY:
description: "Bridge B API key"
required: true
BRIDGE_B_IP_ADDRESS:
description: "Bridge B IP address"
required: true
HOME_LATITUDE:
description: "Latitude (for sunrise/sunset calculations)"
Expand Down Expand Up @@ -81,8 +87,10 @@ jobs:
- name: Bring up containers
env:
VERSION: ${{ inputs.version }}
BRIDGE_API_KEY: ${{ secrets.BRIDGE_API_KEY }}
BRIDGE_IP_ADDRESS: ${{ secrets.BRIDGE_IP_ADDRESS }}
BRIDGE_A_API_KEY: ${{ secrets.BRIDGE_A_API_KEY }}
BRIDGE_A_IP_ADDRESS: ${{ secrets.BRIDGE_A_IP_ADDRESS }}
BRIDGE_B_API_KEY: ${{ secrets.BRIDGE_B_API_KEY }}
BRIDGE_B_IP_ADDRESS: ${{ secrets.BRIDGE_B_IP_ADDRESS }}
HOME_LATITUDE: ${{ secrets.HOME_LATITUDE }}
HOME_LONGITUDE: ${{ secrets.HOME_LONGITUDE }}
WAKE_TIME: ${{ secrets.WAKE_TIME }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ jobs:
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
HOST: ${{ secrets.HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
BRIDGE_API_KEY: ${{ secrets.BRIDGE_API_KEY }}
BRIDGE_IP_ADDRESS: ${{ secrets.BRIDGE_IP_ADDRESS }}
BRIDGE_A_API_KEY: ${{ secrets.BRIDGE_A_API_KEY }}
BRIDGE_A_IP_ADDRESS: ${{ secrets.BRIDGE_A_IP_ADDRESS }}
BRIDGE_B_API_KEY: ${{ secrets.BRIDGE_B_API_KEY }}
BRIDGE_B_IP_ADDRESS: ${{ secrets.BRIDGE_B_IP_ADDRESS }}
HOME_LATITUDE: ${{ secrets.HOME_LATITUDE }}
HOME_LONGITUDE: ${{ secrets.HOME_LONGITUDE }}
WAKE_TIME: ${{ secrets.WAKE_TIME }}
Expand Down
19 changes: 14 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
version: "3"

services:
helios:
helios-a:
image: ghcr.io/dhpiggott/helios:${VERSION}
restart: always
environment:
- BRIDGE_API_KEY
- BRIDGE_IP_ADDRESS
- BRIDGE_A_API_KEY
- BRIDGE_A_IP_ADDRESS
- HOME_LATITUDE
- HOME_LONGITUDE
- WAKE_TIME
- SLEEP_TIME
- TIME_ZONE
helios-b:
image: ghcr.io/dhpiggott/helios:${VERSION}
restart: always
environment:
- BRIDGE_B_API_KEY
- BRIDGE_B_IP_ADDRESS
- HOME_LATITUDE
- HOME_LONGITUDE
- WAKE_TIME
Expand Down

0 comments on commit edb4a7e

Please sign in to comment.