-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
397c2d0
commit 8a686ab
Showing
6 changed files
with
123 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Build Docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
build: | ||
name: Build docker image | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Publish to Dockerhub | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: Build and Publish docker image to dockerhub | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
packages: read | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
with: | ||
name: daithihearn/electricity-prices-dashboard | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
platforms: linux/amd64,linux/arm64/v8 | ||
tags: "latest,${{ github.ref_name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM python:3.11.3 | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
# Install dependencies | ||
COPY requirements.txt /app | ||
RUN pip install --trusted-host pypi.python.org -r requirements.txt | ||
|
||
# Copy source code | ||
COPY . /app | ||
|
||
# Run the app | ||
CMD ["streamlit", "run", "Electricity.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "3.5" | ||
|
||
services: | ||
|
||
electricity-prices-dashboard: | ||
image: electricity-prices-dashboard | ||
container_name: electricity-prices-dashboard | ||
restart: always | ||
ports: | ||
- 8501:8501 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
babel | ||
streamlit | ||
python-dotenv | ||
asyncio | ||
meross_iot==0.4.5.9 | ||
python-i18n[YAML] | ||
python-dateutil | ||
python-dateutil |