mirror of
https://github.com/tebarius/Docker-Flask-QR.git
synced 2026-02-04 04:28:39 +01:00
readme.md geschrieben und Container auf Docker-Hub
This commit is contained in:
20
.idea/workspace.xml
generated
20
.idea/workspace.xml
generated
@@ -1,14 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
|
<component name="ArtifactsWorkspaceSettings">
|
||||||
|
<artifacts-to-build>
|
||||||
|
<artifact name="zip_post" />
|
||||||
|
</artifacts-to-build>
|
||||||
|
</component>
|
||||||
<component name="AutoImportSettings">
|
<component name="AutoImportSettings">
|
||||||
<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="ENV-Variable HTTP_METHOD eingeführt">
|
<list default="true" id="3fdfc273-527d-4717-bd6d-4ba98fba7555" name="Changes" comment="ENV-Variable HTTP_METHOD eingeführt">
|
||||||
<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$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/readme.md" beforeDir="false" afterPath="$PROJECT_DIR$/readme.md" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Dockerfile-RasPi" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile-RasPi" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/app/templates/qr.html" beforeDir="false" afterPath="$PROJECT_DIR$/app/get-templates/qr.html" 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" />
|
||||||
@@ -49,6 +52,9 @@
|
|||||||
<component name="MarkdownSettingsMigration">
|
<component name="MarkdownSettingsMigration">
|
||||||
<option name="stateVersion" value="1" />
|
<option name="stateVersion" value="1" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="MavenRunner">
|
||||||
|
<option name="jreName" value="temurin-17" />
|
||||||
|
</component>
|
||||||
<component name="ProblemsViewState">
|
<component name="ProblemsViewState">
|
||||||
<option name="selectedTabId" value="CurrentFile" />
|
<option name="selectedTabId" value="CurrentFile" />
|
||||||
</component>
|
</component>
|
||||||
@@ -70,11 +76,11 @@
|
|||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
"last_opened_file_path": "/home/tebarius/IdeaProjects/Docker-Flask-QR/app/get-templates",
|
"last_opened_file_path": "D:/mager/Documents/IntelliJ/Docker-Flask-QR/app/POST-Flask-QR.py",
|
||||||
"project.structure.last.edited": "Modules",
|
"project.structure.last.edited": "Artifacts",
|
||||||
"project.structure.proportion": "0.15",
|
"project.structure.proportion": "0.15",
|
||||||
"project.structure.side.proportion": "0.2",
|
"project.structure.side.proportion": "0.2",
|
||||||
"settings.editor.selected.configurable": "preferences.keymap"
|
"settings.editor.selected.configurable": "configurable.group.other"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}]]></component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
@@ -92,7 +98,7 @@
|
|||||||
<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-Raspi">
|
<component name="RunManager" selected="Docker.Dockerfile-local">
|
||||||
<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="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
|||||||
44
readme.md
44
readme.md
@@ -1,9 +1,21 @@
|
|||||||
# Flask QR-Code-Generator
|
# Flask QR-Code-Generator
|
||||||
|
Sorry folks, because this project startet as experiment for Flask and Docker only german description and manual.
|
||||||
|
|
||||||
Dieses Programm benötigt Python und das Flask-Framework um einen kleinen Server auf Port 8002 aufzumachen.
|
HTTP-Server auf Port 8002 mit QR-Code-Generator zur Generierung verschiedener Arten von QR-Codes (Text, URL, Mail, Tel., WIFI, Kalender-Event, vCard, MeCard).
|
||||||
|
|
||||||
|
Eigentlich ist das Projekt für mich ein Experimentierfeld gewesen um mal Flask ein bisschen auszuprobieren
|
||||||
|
|
||||||
|
## ohne Docker
|
||||||
|
Um lokal das ganze zu testen werden nur die Dateien aus dem app-Verzeichnis benötigt.
|
||||||
|
Voraussetzung ist eine funktionierende Python Installation (ich habe nur mit Python 3.11 und 3.12 getestet) und das Flask-Framework inclusive Flask-QRcode welches sich recht einfach über die Konsole mit ...
|
||||||
|
|
||||||
pip install Flask-QRcode
|
pip install Flask-QRcode
|
||||||
... installiert alles Notwendige
|
... installieren lässt.
|
||||||
|
|
||||||
|
Zum Starten dann eine der beiden .py Dateien benutzen, je nachdem welcher
|
||||||
|
HTTP-Modus gewollt ist. Im Zweifelsfall POST... nehmen und wenn ein Doppelklick nicht geht dann halt über die Konsole: `python POST-Flask-QR.py`
|
||||||
|
|
||||||
|
Der Server ist dann via http://localhost:8002 zu erreichen
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
Es gibt 2 unterschiedliche Dockerfile's, da obwohl bei beiden python:slim als Basis genutzt wird,
|
Es gibt 2 unterschiedliche Dockerfile's, da obwohl bei beiden python:slim als Basis genutzt wird,
|
||||||
@@ -12,3 +24,31 @@ dem RaspberryPi 3 via pip install integriert werden kann
|
|||||||
|
|
||||||
## Enviroment-Variablen
|
## Enviroment-Variablen
|
||||||
- `HTTP_METHOD` GET oder POST (default: POST)
|
- `HTTP_METHOD` GET oder POST (default: POST)
|
||||||
|
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
In der Standardeinstellung werden die Formulare mit HTTP-POST-Anfragen gesendet/verarbeitet.
|
||||||
|
Sollte es Gründe geben, warum gewünscht wird, dass dies der HTTP-GET-Variante zu machen, lässt sich das über die Enviroment Variable HTTP_METHOD ändern.
|
||||||
|
|
||||||
|
## Enviroment-Variablen
|
||||||
|
|
||||||
|
- `HTTP_METHOD` GET oder POST (default: POST)
|
||||||
|
|
||||||
|
## Docker Installation/Start
|
||||||
|
https://hub.docker.com/r/tebarius/flask-qrcode-generator
|
||||||
|
### Linux/AMD64
|
||||||
|
- einfacher Start:
|
||||||
|
`docker run -d -p 8002:8002 tebarius/flask-qrcode-generator`
|
||||||
|
erreichbar dann z.B. via http://localhost:8002
|
||||||
|
- mit HTTP-Methode GET auf Port 80:
|
||||||
|
`docker run -d -p 80:8002 -e HTTP_METHOD=GET tebarius/flask-qrcode-generator`
|
||||||
|
erreichbar dann z.B. via http://localhost
|
||||||
|
|
||||||
|
### Linux/ARMv7 (getestet mit RaspberryPi 3)
|
||||||
|
- einfacher Start:
|
||||||
|
`docker run -d -p 8002:8002 tebarius/flask-qrcode-generator:armv7-latest`
|
||||||
|
erreichbar dann z.B. via http://localhost:8002
|
||||||
|
- mit HTTP-Methode GET auf Port80:
|
||||||
|
`docker run -d -p 80:8002 -e HTTP_METHOD=GET tebarius/flask-qrcode-generator:armv7-latest`
|
||||||
|
erreichbar dann z.B. via http://localhost
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user