Add default configuration for development environment

This commit is contained in:
Philipp Grathwohl 2022-02-16 14:20:26 +00:00
parent 9366c18a38
commit a187ec64e1
18 changed files with 452 additions and 4 deletions

View file

@ -1,6 +1,12 @@
ARG VARIANT=3-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
FROM mcr.microsoft.com/vscode/devcontainers/python:3.9-bullseye
RUN apt-get update \
&& apt-get upgrade -y
RUN apt-get install --no-install-recommends -y \
libatlas-base-dev \
libffi-dev \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel
# Install craftbeerpi requirements for better caching

View file

@ -0,0 +1,3 @@
{
"data": []
}

View file

@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=Chromium
Comment=Chromium Webbrowser
NoDisplay=false
Exec=chromium-browser --noerrordialogs --disable-session-crashed-bubble --disable-infobars --force-device-scale-factor=1.00 --start-fullscreen "http://localhost:8000"

View file

@ -0,0 +1,335 @@
{
"AUTHOR": {
"description": "Author",
"name": "AUTHOR",
"options": null,
"type": "string",
"value": "John Doe"
},
"AddMashInStep": {
"description": "Add MashIn Step automatically if not defined in recipe",
"name": "AddMashInStep",
"options": [
{
"label": "Yes",
"value": "Yes"
},
{
"label": "No",
"value": "No"
}
],
"type": "select",
"value": "Yes"
},
"AutoMode": {
"description": "Use AutoMode in steps",
"name": "AutoMode",
"options": [
{
"label": "Yes",
"value": "Yes"
},
{
"label": "No",
"value": "No"
}
],
"type": "select",
"value": "Yes"
},
"BREWERY_NAME": {
"description": "Brewery Name",
"name": "BREWERY_NAME",
"options": null,
"type": "string",
"value": "CraftBeerPi Brewery"
},
"BoilKettle": {
"description": "Define Kettle that is used for Boil, Whirlpool and Cooldown. If not selected, MASH_TUN will be used",
"name": "BoilKettle",
"options": null,
"type": "kettle",
"value": ""
},
"CBPI_TEST_3": {
"description": "test",
"name": "CBPI_TEST_3",
"options": null,
"type": "string",
"value": "1"
},
"CSVLOGFILES": {
"description": "Write sensor data to csv logfiles",
"name": "CSVLOGFILES",
"options": [
{
"label": "Yes",
"value": "Yes"
},
{
"label": "No",
"value": "No"
}
],
"type": "select",
"value": "Yes"
},
"INFLUXDB": {
"description": "Write sensor data to influxdb",
"name": "INFLUXDB",
"options": [
{
"label": "Yes",
"value": "Yes"
},
{
"label": "No",
"value": "No"
}
],
"type": "select",
"value": "No"
},
"INFLUXDBADDR": {
"description": "IP Address of your influxdb server (If INFLUXDBCLOUD set to Yes use URL Address of your influxdb cloud server)",
"name": "INFLUXDBADDR",
"options": null,
"type": "string",
"value": "localhost"
},
"INFLUXDBCLOUD": {
"description": "Write sensor data to influxdb cloud (INFLUXDB must set to Yes)",
"name": "INFLUXDBCLOUD",
"options": [
{
"label": "Yes",
"value": "Yes"
},
{
"label": "No",
"value": "No"
}
],
"type": "select",
"value": "No"
},
"INFLUXDBNAME": {
"description": "Name of your influxdb database name (If INFLUXDBCLOUD set to Yes use bucket of your influxdb cloud database)",
"name": "INFLUXDBNAME",
"options": null,
"type": "string",
"value": "cbpi4"
},
"INFLUXDBPORT": {
"description": "Port of your influxdb server",
"name": "INFLUXDBPORT",
"options": null,
"type": "string",
"value": "8086"
},
"INFLUXDBPWD": {
"description": "Password for your influxdb database (only if required)(If INFLUXDBCLOUD set to Yes use token of your influxdb cloud database)",
"name": "INFLUXDBPWD",
"options": null,
"type": "string",
"value": " "
},
"INFLUXDBUSER": {
"description": "User name for your influxdb database (only if required)(If INFLUXDBCLOUD set to Yes use organisation of your influxdb cloud database)",
"name": "INFLUXDBUSER",
"options": null,
"type": "string",
"value": " "
},
"MASH_TUN": {
"description": "Default Mash Tun",
"name": "MASH_TUN",
"options": null,
"type": "kettle",
"value": ""
},
"MQTTUpdate": {
"description": "Forced MQTT Update frequency in s for Kettle and Fermenter (no changes in payload required). Restart required after change",
"name": "MQTTUpdate",
"options": [
{
"label": "30",
"value": 30
},
{
"label": "60",
"value": 60
},
{
"label": "120",
"value": 120
},
{
"label": "300",
"value": 300
},
{
"label": "Never",
"value": 0
}
],
"type": "select",
"value": 0
},
"RECIPE_CREATION_PATH": {
"description": "API path to creation plugin. Default: upload . CHANGE ONLY IF USING A RECIPE CREATION PLUGIN",
"name": "RECIPE_CREATION_PATH",
"options": null,
"type": "string",
"value": "upload"
},
"TEMP_UNIT": {
"description": "Temperature Unit",
"name": "TEMP_UNIT",
"options": [
{
"label": "C",
"value": "C"
},
{
"label": "F",
"value": "F"
}
],
"type": "select",
"value": "C"
},
"brewfather_api_key": {
"description": "Brewfather API Key",
"name": "brewfather_api_key",
"options": null,
"type": "string",
"value": ""
},
"brewfather_user_id": {
"description": "Brewfather User ID",
"name": "brewfather_user_id",
"options": null,
"type": "string",
"value": ""
},
"current_dashboard_number": {
"description": "Number of current Dashboard",
"name": "current_dashboard_number",
"options": null,
"type": "number",
"value": 1
},
"max_dashboard_number": {
"description": "Max Number of Dashboards",
"name": "max_dashboard_number",
"options": [
{
"label": "1",
"value": 1
},
{
"label": "2",
"value": 2
},
{
"label": "3",
"value": 3
},
{
"label": "4",
"value": 4
},
{
"label": "5",
"value": 5
},
{
"label": "6",
"value": 6
},
{
"label": "7",
"value": 7
},
{
"label": "8",
"value": 8
},
{
"label": "9",
"value": 9
},
{
"label": "10",
"value": 10
}
],
"type": "select",
"value": 4
},
"steps_boil": {
"description": "Boil step type",
"name": "steps_boil",
"options": null,
"type": "step",
"value": "BoilStep"
},
"steps_boil_temp": {
"description": "Default Boil Temperature for Recipe Creation",
"name": "steps_boil_temp",
"options": null,
"type": "number",
"value": "99"
},
"steps_cooldown": {
"description": "Cooldown step type",
"name": "steps_cooldown",
"options": null,
"type": "step",
"value": "CooldownStep"
},
"steps_cooldown_actor": {
"description": "Actor to trigger cooldown water on and off (default: None)",
"name": "steps_cooldown_actor",
"options": null,
"type": "actor",
"value": ""
},
"steps_cooldown_sensor": {
"description": "Alternative Sensor to monitor temperature durring cooldown (if not selected, Kettle Sensor will be used)",
"name": "steps_cooldown_sensor",
"options": null,
"type": "sensor",
"value": ""
},
"steps_cooldown_temp": {
"description": "Cooldown temp will send notification when this temeprature is reached",
"name": "steps_cooldown_temp",
"options": null,
"type": "number",
"value": "20"
},
"steps_mash": {
"description": "Mash step type",
"name": "steps_mash",
"options": null,
"type": "step",
"value": "MashStep"
},
"steps_mashin": {
"description": "MashIn step type",
"name": "steps_mashin",
"options": null,
"type": "step",
"value": "MashInStep"
},
"steps_mashout": {
"description": "MashOut step type",
"name": "steps_mashout",
"options": null,
"type": "step",
"value": "NotificationStep"
}
}

View file

@ -0,0 +1,20 @@
name: CraftBeerPi
version: 4.0.8
index_url: /cbpi_ui/static/index.html
port: 8000
mqtt: true
mqtt_host: mqtt
mqtt_port: 1883
mqtt_username: craftbeerpi
mqtt_password: cbpiSuperSecMq77!
username: cbpi
password: 123
plugins:
- cbpi4ui

View file

@ -0,0 +1,9 @@
[Unit]
Description=Craftbeer Pi
[Service]
WorkingDirectory=/home/pi
ExecStart=/usr/local/bin/cbpi start
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,3 @@
{
"elements": []
}

View file

@ -0,0 +1,3 @@
{
"data": []
}

View file

@ -0,0 +1,3 @@
{
"data": []
}

View file

@ -0,0 +1,3 @@
{
"data": []
}

View file

@ -0,0 +1,6 @@
{
"basic": {
"name": ""
},
"steps": []
}

View file

@ -0,0 +1,5 @@
#!/bin/bash
USER=craftbeerpi
PASSWORD=craftbeerpi
docker run -it --rm -v "$(pwd)/mosquitto/config/mosquitto.passwd:/opt/passwdfile" eclipse-mosquitto:2 mosquitto_passwd -b /opt/passwdfile $USER $PASSWORD

View file

@ -2,7 +2,7 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/docker-existing-docker-compose
// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
{
"name": "CraftBeerPi4 Development Container",
"name": "CraftBeerPi4",
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
@ -32,7 +32,10 @@
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [80],
"forwardPorts": [
"craftbeerpi4-development:8000",
"mqtt-explorer:4000"
],
// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],

View file

@ -0,0 +1,10 @@
persistence true
persistence_location /mosquitto/data
log_dest file /mosquitto/log/mosquitto.log
log_dest stdout
password_file /mosquitto/config/mosquitto.passwd
allow_anonymous false
port 1883

View file

@ -0,0 +1,2 @@
craftbeerpi:$7$101$cRIEIwJ9L/+TAFF1$lxT+v9SisokWaRBgB/Scut7DaotH4RMgzHttYHhwuy6m5yatSoac7bwrkztoQ7raNehBhKt/A4VVejnzozdxXA==
mqtt-explorer:$7$101$SFFKvbIBVXFFAIBp$Pgue6DaAfcuhegjEqtTjf+WWgNZ8geiv1/3fXqmJ0APmd0L80wNTSrEhnFdJmHvi0/vW6V9bVKPJfVRDIjPxCw==

View file

@ -0,0 +1,31 @@
{
"ConnectionManager_connections": {
"mqtt.eclipse.org": {
"configVersion": 1,
"certValidation": true,
"clientId": "mqtt-explorer-8eb042b9",
"id": "mqtt.eclipse.org",
"name": "CraftBeerPi MQTT Explorer",
"encryption": false,
"subscriptions": [
{
"topic": "#",
"qos": 0
},
{
"topic": "$SYS/#",
"qos": 0
}
],
"type": "mqtt",
"host": "mqtt",
"port": 1883,
"protocol": "mqtt",
"changeSet": {
"password": "mqtt-explorer"
},
"username": "mqtt-explorer",
"password": "mqtt-explorer"
}
}
}