added dockerfiles
This commit is contained in:
parent
1afee95737
commit
947aae7d71
@ -59,12 +59,12 @@ def index():
|
||||
qrtype = request.args.get('type')
|
||||
|
||||
codeimg = "<h2> fill out info to generate qr code </h2>"
|
||||
if qrtype:
|
||||
if qrtype and request.args.get('link') != None:
|
||||
print(qrtype)
|
||||
try:
|
||||
if qrtype == "LINK":
|
||||
codeimg = f'<img src="qrcode?link={request.args.get('link')}"'
|
||||
elif qrtype == "MAIL":
|
||||
elif qrtype == "EMAIL":
|
||||
codeimg = f'<img src="qrcode?link=MAILTO:{request.args.get('link')}">'
|
||||
elif qrtype == "TEL":
|
||||
codeimg = f'<img src="qrcode?link=TEL:{request.args.get('link')}" width="400" height="400">'
|
||||
|
6
docker-compose.yml
Normal file
6
docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
||||
services:
|
||||
myapp:
|
||||
build: .
|
||||
ports:
|
||||
- "7123:7123"
|
||||
container_name: contact info
|
16
dockerfile
Normal file
16
dockerfile
Normal file
@ -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"]
|
2
reqrirements.txt
Normal file
2
reqrirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
qrcode[pil]
|
||||
flask
|
Loading…
x
Reference in New Issue
Block a user