From 947aae7d7109db8b53eb01a50d1a56011d0750af Mon Sep 17 00:00:00 2001 From: ocueye2 Date: Thu, 30 Jan 2025 01:54:20 +0000 Subject: [PATCH] added dockerfiles --- codegen.py | 4 ++-- docker-compose.yml | 6 ++++++ dockerfile | 16 ++++++++++++++++ reqrirements.txt | 2 ++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 docker-compose.yml create mode 100644 dockerfile create mode 100644 reqrirements.txt diff --git a/codegen.py b/codegen.py index c0e9752..584d368 100644 --- a/codegen.py +++ b/codegen.py @@ -59,12 +59,12 @@ def index(): qrtype = request.args.get('type') codeimg = "

fill out info to generate qr code

" - if qrtype: + if qrtype and request.args.get('link') != None: print(qrtype) try: if qrtype == "LINK": codeimg = f'' elif qrtype == "TEL": codeimg = f'' diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..322cc88 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +services: + myapp: + build: . + ports: + - "7123:7123" + container_name: contact info diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..97d8324 --- /dev/null +++ b/dockerfile @@ -0,0 +1,16 @@ +FROM python:3.12.3-slim + + +WORKDIR /app + +# clone repo +clone . . + +RUN pip install flask + +# Make port 8080 available to the world outside this container +EXPOSE 7123 + +WORKDIR /app/musicserver +# Run app.py when the container launches +CMD ["python", "contact.py"] diff --git a/reqrirements.txt b/reqrirements.txt new file mode 100644 index 0000000..24d9133 --- /dev/null +++ b/reqrirements.txt @@ -0,0 +1,2 @@ +qrcode[pil] +flask \ No newline at end of file