mirror of
https://github.com/tebarius/Docker-Flask-QR.git
synced 2025-12-20 22:23:30 +01:00
Bugfixes in wifi-qr + update DockerImages to v1.2.1
This commit is contained in:
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@@ -1,8 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="Black">
|
<component name="Black">
|
||||||
<option name="sdkName" value="Python 3.12 (Docker-Flask-QR)" />
|
<option name="sdkName" value="Python 3.12 (Docker-Flask-QR)" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" project-jdk-name="Python 3.11 FlaskQR(venv)" project-jdk-type="Python SDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" project-jdk-name="Python 3.12 (Docker-Flask-QR)" project-jdk-type="Python SDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
4
.idea/runConfigurations/Dockerfile_Raspi.xml
generated
4
.idea/runConfigurations/Dockerfile_Raspi.xml
generated
@@ -2,8 +2,8 @@
|
|||||||
<configuration default="false" name="Dockerfile-Raspi" type="docker-deploy" factoryName="dockerfile" server-name="Docker-RasPi">
|
<configuration default="false" name="Dockerfile-Raspi" type="docker-deploy" factoryName="dockerfile" server-name="Docker-RasPi">
|
||||||
<deployment type="dockerfile">
|
<deployment type="dockerfile">
|
||||||
<settings>
|
<settings>
|
||||||
<option name="imageTag" value="flask-qrcode-gen:latest" />
|
<option name="imageTag" value="tebarius/flask-qrcode-generator:armv7-latest, ghcr.io/tebarius/flask-qrcode-generator:armv7-latest" />
|
||||||
<option name="containerName" value="flask-qrcode-gen" />
|
<option name="containerName" value="Flask-QRcode-Gen" />
|
||||||
<option name="portBindings">
|
<option name="portBindings">
|
||||||
<list>
|
<list>
|
||||||
<DockerPortBindingImpl>
|
<DockerPortBindingImpl>
|
||||||
|
|||||||
2
.idea/runConfigurations/Dockerfile_local.xml
generated
2
.idea/runConfigurations/Dockerfile_local.xml
generated
@@ -2,7 +2,7 @@
|
|||||||
<configuration default="false" name="Dockerfile-local" type="docker-deploy" factoryName="dockerfile" server-name="Docker-local">
|
<configuration default="false" name="Dockerfile-local" type="docker-deploy" factoryName="dockerfile" server-name="Docker-local">
|
||||||
<deployment type="dockerfile">
|
<deployment type="dockerfile">
|
||||||
<settings>
|
<settings>
|
||||||
<option name="imageTag" value="flask-qrcode-gen:latest" />
|
<option name="imageTag" value="tebarius/flask-qrcode-generator:latest, ghcr.io/tebarius/flask-qrcode-generator:latest" />
|
||||||
<option name="containerName" value="Flask-QRcode-Gen" />
|
<option name="containerName" value="Flask-QRcode-Gen" />
|
||||||
<option name="portBindings">
|
<option name="portBindings">
|
||||||
<list>
|
<list>
|
||||||
|
|||||||
62
.idea/workspace.xml
generated
62
.idea/workspace.xml
generated
@@ -9,9 +9,17 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="3fdfc273-527d-4717-bd6d-4ba98fba7555" name="Changes" comment="readme.md geschrieben und Container auf Docker-Hub">
|
<list default="true" id="3fdfc273-527d-4717-bd6d-4ba98fba7555" name="Changes" comment="URLs in readme.md auf ghcr.io">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/runConfigurations/Dockerfile_Raspi.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/runConfigurations/Dockerfile_Raspi.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/runConfigurations/Dockerfile_local.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/runConfigurations/Dockerfile_local.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/readme.md" beforeDir="false" afterPath="$PROJECT_DIR$/readme.md" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Dockerfile-RasPi" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile-RasPi" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/GET-Flask-QR.py" beforeDir="false" afterPath="$PROJECT_DIR$/app/GET-Flask-QR.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/POST-Flask-QR.py" beforeDir="false" afterPath="$PROJECT_DIR$/app/POST-Flask-QR.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/post-templates/wifi.html" beforeDir="false" afterPath="$PROJECT_DIR$/app/post-templates/wifi.html" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/qr-static/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/app/qr-static/style.css" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -69,20 +77,25 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"DefaultHtmlFileTemplate": "HTML File",
|
"DefaultHtmlFileTemplate": "HTML File",
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"Docker.Dockerfile-Raspi.executor": "Run",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"Docker.Dockerfile-local.executor": "Run",
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"Docker.Dockerfile.executor": "Run",
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
"Python.GET-Flask-QR.executor": "Run",
|
||||||
"last_opened_file_path": "D:/mager/Documents/IntelliJ/Docker-Flask-QR/app/POST-Flask-QR.py",
|
"Python.POST-Flask-QR.executor": "Run",
|
||||||
"project.structure.last.edited": "Artifacts",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"project.structure.proportion": "0.15",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"project.structure.side.proportion": "0.2",
|
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"settings.editor.selected.configurable": "preferences.pluginManager"
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
|
"last_opened_file_path": "D:/mager/Documents/IntelliJ/Docker-Flask-QR/app/POST-Flask-QR.py",
|
||||||
|
"project.structure.last.edited": "Project",
|
||||||
|
"project.structure.proportion": "0.15",
|
||||||
|
"project.structure.side.proportion": "0.2",
|
||||||
|
"settings.editor.selected.configurable": "preferences.pluginManager"
|
||||||
}
|
}
|
||||||
}</component>
|
}]]></component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
<recent name="$PROJECT_DIR$/app/get-templates" />
|
<recent name="$PROJECT_DIR$/app/get-templates" />
|
||||||
@@ -98,9 +111,10 @@
|
|||||||
<recent name="D:\mager\Documents\IntelliJ\Docker-Flask-QR" />
|
<recent name="D:\mager\Documents\IntelliJ\Docker-Flask-QR" />
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager" selected="Docker.Dockerfile-local">
|
<component name="RunManager" selected="Docker.Dockerfile-Raspi">
|
||||||
<configuration name="GET-Flask-QR" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
<configuration name="GET-Flask-QR" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
||||||
<module name="Docker-Flask-QR" />
|
<module name="Docker-Flask-QR" />
|
||||||
|
<option name="ENV_FILES" value="" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
<envs>
|
<envs>
|
||||||
@@ -123,6 +137,7 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="POST-Flask-QR" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
<configuration name="POST-Flask-QR" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
||||||
<module name="Docker-Flask-QR" />
|
<module name="Docker-Flask-QR" />
|
||||||
|
<option name="ENV_FILES" value="" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
<envs>
|
<envs>
|
||||||
@@ -158,8 +173,8 @@
|
|||||||
<list>
|
<list>
|
||||||
<item itemvalue="Docker.Dockerfile-local" />
|
<item itemvalue="Docker.Dockerfile-local" />
|
||||||
<item itemvalue="Docker.Dockerfile-Raspi" />
|
<item itemvalue="Docker.Dockerfile-Raspi" />
|
||||||
<item itemvalue="Python.POST-Flask-QR" />
|
|
||||||
<item itemvalue="Python.GET-Flask-QR" />
|
<item itemvalue="Python.GET-Flask-QR" />
|
||||||
|
<item itemvalue="Python.POST-Flask-QR" />
|
||||||
</list>
|
</list>
|
||||||
</component>
|
</component>
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
@@ -267,7 +282,15 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1699999431716</updated>
|
<updated>1699999431716</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="13" />
|
<task id="LOCAL-00013" summary="URLs in readme.md auf ghcr.io">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1700154394950</created>
|
||||||
|
<option name="number" value="00013" />
|
||||||
|
<option name="presentableId" value="LOCAL-00013" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1700154394950</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="14" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
@@ -305,7 +328,8 @@
|
|||||||
<MESSAGE value="Variante mit POST-REQUESTS ergänzt und Dockerfiles auf POST umgestellt" />
|
<MESSAGE value="Variante mit POST-REQUESTS ergänzt und Dockerfiles auf POST umgestellt" />
|
||||||
<MESSAGE value="ENV-Variable HTTP_METHOD eingeführt" />
|
<MESSAGE value="ENV-Variable HTTP_METHOD eingeführt" />
|
||||||
<MESSAGE value="readme.md geschrieben und Container auf Docker-Hub" />
|
<MESSAGE value="readme.md geschrieben und Container auf Docker-Hub" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="readme.md geschrieben und Container auf Docker-Hub" />
|
<MESSAGE value="URLs in readme.md auf ghcr.io" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="URLs in readme.md auf ghcr.io" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XSLT-Support.FileAssociations.UIState">
|
<component name="XSLT-Support.FileAssociations.UIState">
|
||||||
<expand />
|
<expand />
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
FROM python:slim
|
FROM python:slim
|
||||||
|
|
||||||
LABEL authors="tebarius"
|
LABEL authors="tebarius"
|
||||||
LABEL version="1.2"
|
LABEL version="1.2.1"
|
||||||
LABEL description="QR-Code-Generator-Server with Flask-App"
|
LABEL description="QR-Code-Generator-Server with Flask-App"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY ./app /app/
|
COPY ./app /app/
|
||||||
|
|
||||||
#RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
||||||
|
|
||||||
EXPOSE 8002
|
EXPOSE 8002
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
FROM python:slim
|
FROM python:slim
|
||||||
|
|
||||||
LABEL authors="tebarius"
|
LABEL authors="tebarius"
|
||||||
LABEL version="1.2"
|
LABEL version="1.2.1"
|
||||||
LABEL description="QR-Code-Generator-Server with Flask-App"
|
LABEL description="QR-Code-Generator-Server with Flask-App"
|
||||||
LABEL platform="Raspberry Pi 3 with Raspian"
|
LABEL platform="Raspberry Pi 3 with Raspian"
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ WORKDIR /app
|
|||||||
COPY ./app /app/
|
COPY ./app /app/
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y gcc zlib1g-dev libjpeg-dev
|
RUN apt-get update && apt-get install -y gcc zlib1g-dev libjpeg-dev
|
||||||
#RUN python -m pip install --upgrade pip
|
RUN python -m pip install --upgrade pip
|
||||||
#RUN python -m pip install --upgrade pillow
|
#RUN python -m pip install --upgrade pillow
|
||||||
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
||||||
|
|
||||||
|
|||||||
@@ -171,9 +171,9 @@ def makeqr():
|
|||||||
ssid = (request.args.get("ssid").replace("\\", "\\\\").replace(";", "\\;")
|
ssid = (request.args.get("ssid").replace("\\", "\\\\").replace(";", "\\;")
|
||||||
.replace(",", "\\,").replace(":", "\\:").replace("\"", "\\\""))
|
.replace(",", "\\,").replace(":", "\\:").replace("\"", "\\\""))
|
||||||
if request.args.get("auth") == "WPA":
|
if request.args.get("auth") == "WPA":
|
||||||
data = f'WIFI:T:WPA;S:"{ssid}";P:"{passw}"'
|
data = f'WIFI:T:WPA;S:"{ssid}";P:"{passw}";'
|
||||||
else:
|
else:
|
||||||
data = f'WIFI:T:nopass;S:"{ssid}"'
|
data = f'WIFI:T:nopass;S:"{ssid}";'
|
||||||
if request.args.get("hidden"):
|
if request.args.get("hidden"):
|
||||||
data += "H:true;;"
|
data += "H:true;;"
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -171,13 +171,14 @@ def makeqr():
|
|||||||
ssid = (request.form["ssid"].replace("\\", "\\\\").replace(";", "\\;")
|
ssid = (request.form["ssid"].replace("\\", "\\\\").replace(";", "\\;")
|
||||||
.replace(",", "\\,").replace(":", "\\:").replace("\"", "\\\""))
|
.replace(",", "\\,").replace(":", "\\:").replace("\"", "\\\""))
|
||||||
if request.form["auth"] == "WPA":
|
if request.form["auth"] == "WPA":
|
||||||
data = f'WIFI:T:WPA;S:"{ssid}";P:"{passw}"'
|
data = f'WIFI:T:WPA;S:"{ssid}";P:"{passw}";'
|
||||||
else:
|
else:
|
||||||
data = f'WIFI:T:nopass;S:"{ssid}"'
|
data = f'WIFI:T:nopass;S:"{ssid}";'
|
||||||
if request.form["hidden"]:
|
if 'ssid_hidden' in request.form:
|
||||||
data += "H:true;;"
|
data += "H:true;;"
|
||||||
else:
|
else:
|
||||||
data += ";"
|
data += ";"
|
||||||
|
|
||||||
elif request.form['type'] == "cal":
|
elif request.form['type'] == "cal":
|
||||||
# Format für Calendar (Zeilenumbrüche beachten!!):
|
# Format für Calendar (Zeilenumbrüche beachten!!):
|
||||||
# BEGIN:VEVENT
|
# BEGIN:VEVENT
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<input type="text" name="ssid" id="ssid" size="30" maxlength="60" required><br />
|
<input type="text" name="ssid" id="ssid" size="30" maxlength="60" required><br />
|
||||||
<label for="passw">Passcode / Passwort:</label>
|
<label for="passw">Passcode / Passwort:</label>
|
||||||
<input type="text" name="passw" id="passw" size="30" maxlength="60"><br />
|
<input type="text" name="passw" id="passw" size="30" maxlength="60"><br />
|
||||||
<input type="checkbox" name="hidden" id="hidden" value=True>
|
<input type="checkbox" name="ssid_hidden" id="ssid_hidden" value=True>
|
||||||
<label for="hidden"><i>versteckte / unsichtbare SSID</i></label><br />
|
<label for="ssid_hidden"><i>versteckte / unsichtbare SSID</i></label><br />
|
||||||
<label>
|
<label>
|
||||||
<input name="auth" type="radio" value="WPA" required>
|
<input name="auth" type="radio" value="WPA" required>
|
||||||
</label> WPA/WPA2/WPA3<br />
|
</label> WPA/WPA2/WPA3<br />
|
||||||
@@ -18,11 +18,6 @@
|
|||||||
<input name="auth" type="radio" value="nopass" required>
|
<input name="auth" type="radio" value="nopass" required>
|
||||||
</label> keine Verschlüsselung
|
</label> keine Verschlüsselung
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<button type="reset">Eingaben zurücksetzen</button>
|
<button type="reset">Eingaben zurücksetzen</button>
|
||||||
<button type="submit">Eingaben absenden</button>
|
<button type="submit">Eingaben absenden</button>
|
||||||
|
|||||||
@@ -28,13 +28,13 @@
|
|||||||
}
|
}
|
||||||
input[type='radio']
|
input[type='radio']
|
||||||
{
|
{
|
||||||
transform: scale(4);
|
transform: scale(3);
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
vertical-align:10px;
|
vertical-align:10px;
|
||||||
}
|
}
|
||||||
input[type='checkbox']
|
input[type='checkbox']
|
||||||
{
|
{
|
||||||
transform: scale(4);
|
transform: scale(3);
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
vertical-align:10px;
|
vertical-align:10px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user