-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from guimatheus92/users/guimatheus92/onboard-do…
…cker Onboard docker
- Loading branch information
Showing
7 changed files
with
133 additions
and
42 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,4 @@ | ||
__pycache__ | ||
*.pyc | ||
.env | ||
.git |
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,48 @@ | ||
# Contributing Guidelines | ||
|
||
All types of contributions are encouraged and valued. Please make sure to read | ||
relevant sections in this file and in README before making your contribution. It | ||
will make it a lot easier for us maintainers and smooth out the experience for | ||
all involved. This project looks forward to your contributions :tada: | ||
|
||
## How to contribute | ||
|
||
#### Development | ||
|
||
|
||
1. **Clone the Repository**: | ||
|
||
```bash | ||
git clone https://github.com/guimatheus92/node-red-homeassistant-three-way.git | ||
cd node-red-homeassistant-three-way | ||
``` | ||
|
||
2. Run the command below to install dependecies libraries: | ||
|
||
```python | ||
pip install -r requirements.txt | ||
``` | ||
|
||
3. Update the `config.yaml` file with your Home Assistant URL and access token: | ||
|
||
```yaml | ||
home_assistant: | ||
home_assistant_url: 'http://your-home-assistant-url:8123' | ||
access_token: 'your-access-token' | ||
``` | ||
|
||
4. Run app using the command below: | ||
|
||
```sh | ||
flask run | ||
``` | ||
|
||
## Submitting Pull Request | ||
|
||
* Ensure any install or build dependencies are working and the code is | ||
generating the right output before submitting a PR | ||
* Update the README.md with details of changes to the interface, this includes | ||
new fields, features, etc. | ||
* Promptly address any CI failures. If your pull request fails to build or pass | ||
tests, please push another commit to fix it | ||
* Resolve any merge conflicts that occur |
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,20 @@ | ||
# Use the official Python image from the Docker Hub | ||
FROM python:3.8-slim | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy the current directory contents into the container at /app | ||
COPY . /app | ||
|
||
# Install any needed packages specified in requirements.txt | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Make port 5000 available to the world outside this container | ||
EXPOSE 5000 | ||
|
||
# Define environment variable | ||
ENV FLASK_ENV=production | ||
|
||
# Run run.py when the container launches | ||
CMD ["python", "run.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
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 @@ | ||
services: | ||
web: | ||
container_name: node-red-homeassistant-three-way | ||
image: guimatheus92/node-red-homeassistant-three-way | ||
build: | ||
context: . | ||
volumes: | ||
- .:/app | ||
ports: | ||
- "5000:5000" |
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