- readme
- functional code
This commit is contained in:
1 parent
63cfd936b5
commit
1e44a28919
7 files changed
+73
-14
No files matched your search
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"python.formatting.provider": "black"
|
||||
}
|
||||
+36
-9
@@ -1,17 +1,44 @@
|
||||
ARG BUILD_FROM
|
||||
# ================
|
||||
# Python Build Stage
|
||||
# ================
|
||||
FROM python:3.9 as pybuilder
|
||||
|
||||
WORKDIR /python
|
||||
|
||||
COPY api/setup.py /python/setup.py
|
||||
RUN python -m venv /python/venv
|
||||
RUN /python/venv/bin/pip install --use-feature=in-tree-build /python/
|
||||
|
||||
# ================
|
||||
# Web Build Stage
|
||||
# ================
|
||||
FROM node:16.13.0-alpine as webbuilder
|
||||
|
||||
WORKDIR /web
|
||||
COPY webapp/ /web
|
||||
RUN npm install
|
||||
RUN yarn build
|
||||
|
||||
# ================
|
||||
# Main Image
|
||||
# ================
|
||||
FROM $BUILD_FROM
|
||||
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Install requirements for add-on
|
||||
RUN apk add --no-cache python3
|
||||
|
||||
# Python 3 HTTP Server serves the current working dir
|
||||
# So let's set it to our add-on persistent data directory.
|
||||
WORKDIR /data
|
||||
RUN apk add gcompat python3
|
||||
RUN ln -s $(which python3) /usr/local/bin/python
|
||||
|
||||
# Copy data for add-on
|
||||
COPY run.sh /
|
||||
RUN chmod a+x /run.sh
|
||||
COPY --from=pybuilder /python/venv /data/venv
|
||||
COPY --from=webbuilder /web/build /data/web
|
||||
|
||||
CMD [ "/run.sh" ]
|
||||
COPY api/src /data/src
|
||||
|
||||
|
||||
ENV HASSIO_TOKEN ""
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD [ "/data/venv/bin/python", "-m", "uvicorn", "src.app:app" ]
|
||||
@@ -0,0 +1,6 @@
|
||||
run_locally:
|
||||
docker-compose build
|
||||
docker-compose up -d
|
||||
docker-compose ps
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Shortumation
|
||||
|
||||
A [home-assistent addon](https://www.home-assistant.io/addons/) for a better UI for managing your automations & scripts. We provide a way to visualize and develop your automation using a visual-programming language that draws inspirations from [Node-Red](https://nodered.org/).
|
||||
|
||||
## Features
|
||||
|
||||
- [X] View your automations & scripts in a visual graph
|
||||
- [X] See all automations in one common view
|
||||
- [X] Automation Manager
|
||||
- [ ] Script Manager
|
||||
- [ ] Use secrets and global parameters
|
||||
- [ ] Autocomplete fields for entities/devices
|
||||
- [ ] Autocomplete fields for template editor
|
||||
- [ ] Autocomplete fields for referencing scripts
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
version: '3'
|
||||
services:
|
||||
addon:
|
||||
image: "shortumation:${BUILD_TAG:-latest}"
|
||||
build:
|
||||
context: "./"
|
||||
dockerfile: "./Dockerfile"
|
||||
args:
|
||||
- BUILD_FROM=homeassistant/amd64-base:latest
|
||||
volumes:
|
||||
- "./sample_config:/config"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
echo Hello world!
|
||||
|
||||
python3 -m http.server 8000
|
||||
File renamed without changes.
Reference in new issue
Block a user