Initial commit

This commit is contained in:
2025-11-13 22:46:11 +03:00
commit 7231349e96
7 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#.dockerignore
# Docker
.dockerignore
dockerfile
compose.yaml
compose.yml
# Git
.gitignore
*.md
example.env

1
nginx-python/README.md Normal file
View File

@ -0,0 +1 @@
todo README.md

6
nginx-python/compose.yml Normal file
View File

@ -0,0 +1,6 @@
services:
meow:
image: image:latest
container_name: somename4test
restart: unless-stopped

8
nginx-python/dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM python:3.13-slim
WORKDIR /app
COPY . .
CMD ["python", "src/main.py"]

32
nginx-python/src/main.py Normal file
View File

@ -0,0 +1,32 @@
from http.server import BaseHTTPRequestHandler, HTTPServer
class MyHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
html_content = """
<!DOCTYPE html>
<html>
<head>
<title>Meow</title>
</head>
<body>
<h1>I'm cat so meow</h1>
<p>The current time is: {}</p>
</body>
</html>
""".format(self.date_time_string())
self.wfile.write(html_content.encode('utf-8'))
def run(server_class=HTTPServer, handler_class=MyHandler, port=4422):
server_address = ('', port)
httpd = server_class(server_address, handler_class)
print(f'Starting httpd server on port {port}...')
httpd.serve_forever()
if __name__ == '__main__':
run()