Skip to content

Commit

Permalink
Merge pull request #4 from LaJaqueria/dev
Browse files Browse the repository at this point in the history
Minima info para cacharrear
  • Loading branch information
crisconru authored Apr 20, 2024
2 parents 1371112 + 1f0d58f commit 64008fa
Show file tree
Hide file tree
Showing 10 changed files with 3,368 additions and 313 deletions.
299 changes: 1 addition & 298 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,301 +1,4 @@
# CUSTOM
.DS_Store
.vscode
.idea
website/site/

# PYTHON

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# NODEJS

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
*/**.env
17 changes: 17 additions & 0 deletions src/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# NODE-RED
NODE_RED_PORT=1880
NODE_RED_DB=./nodered/config
NODE_RED_CONFIG=./nodered/db
NODE_RED_DATA=./nodered/data
NODE_RED_STATIC=./nodered/static
NODE_RED_TESTS=./nodered/tests

# MQTT
MQTT_HOST=mosquitto
MQTT_PORT=1883
MQTT_WEBSOCKET=9001
MQTT_USER=
MQTT_PASS=
MQTT_CONFIG=./mosquitto/config
MQTT_DATA=./mosquitto/data
MQTT_LOG=./mosquitto/log
16 changes: 16 additions & 0 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM nodered/node-red:latest-18

USER root

RUN mkdir -p /config && chown node-red:node-red /config && chmod -R 777 /config \
&& mkdir -p /db && chown node-red:node-red /db && chmod -R 777 /db \
&& mkdir -p /static && chown node-red:node-red /static && chmod -R 777 /static \
&& mkdir -p /tests && chown node-red:node-red /tests && chmod -R 777 /tests

USER node-red

RUN npm i \
@flowfuse/node-red-dashboard \
@flowfuse/node-red-dashboard-2-ui-led \
fast-deep-equal
# @wdns/vue-code-block
35 changes: 35 additions & 0 deletions src/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# version: '3'
name: gloria-fuertes

services:

nodered:
build:
context: .
dockerfile: Dockerfile
container_name: nodeled
restart: unless-stopped
environment:
- MQTT_HOST=${MQTT_HOST}
- MQTT_PORT=${MQTT_PORT}
- MQTT_USER=${MQTT_USER}
- MQTT_PASS=${MQTT_PASS}
ports:
- ${NODE_RED_PORT}:1880
volumes:
- ${NODE_RED_DB}:/config
- ${NODE_RED_CONFIG}:/db
- ${NODE_RED_DATA}:/data
- ${NODE_RED_STATIC}:/static
- ${NODE_RED_TESTS}:/tests

# mosquitto:
# image: eclipse-mosquitto:2
# restart: unless-stopped
# ports:
# - ${MQTT_PORT}:1883
# - ${MQTT_WEBSOCKET}:9001
# volumes:
# - ${MQTT_CONFIG}:/config
# - ${MQTT_DATA}:/data
# - ${MQTT_LOG}:/log
Loading

0 comments on commit 64008fa

Please sign in to comment.