Upload files to "/"

This commit is contained in:
pk13274 2025-03-25 13:47:05 +00:00
parent 9704662342
commit 2bae2e68c5
3 changed files with 23 additions and 6 deletions

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Make port 5000 available to the world outside this container
EXPOSE 5000
# Define environment variable
ENV NAME World
# Run app.py when the container launches
CMD ["python3", "app.py"]

8
app.py
View File

@ -34,9 +34,7 @@ HTML_TEMPLATE = '''
</style> </style>
</head> </head>
<body> <body>
<center><h1>Master Chris</h1> <h1>Chris/Alice Master/Kitten Contract (Read Only)</h1>
<h1>Kitten Alice</h1>
<h1>Contract</h1></center>
<ul id="list"> <ul id="list">
{% for item in items %} {% for item in items %}
<li>{{ item }} <button onclick="deleteItem({{ loop.index0 }})">Delete</button></li> <li>{{ item }} <button onclick="deleteItem({{ loop.index0 }})">Delete</button></li>
@ -97,9 +95,7 @@ READ_ONLY_HTML_TEMPLATE = '''
</style> </style>
</head> </head>
<body> <body>
<center><h1>Master Chris</h1> <h1>Chris/Alice Master/Kitten Contract</h1>
<h1>Kitten Alice</h1>
<h1>Contract</h1></center>
<ul id="list"> <ul id="list">
{% for item in items %} {% for item in items %}
<li>{{ item }}</li> <li>{{ item }}</li>

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
Flask==2.0.1