first commit
This commit is contained in:
commit
9b6b005ca3
18
.drone.yml
Normal file
18
.drone.yml
Normal file
@ -0,0 +1,18 @@
|
||||
kind: pipeline
|
||||
name: auto-repo-update-drone-plugin
|
||||
type: docker
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: push-built-image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: gitea.scubbo.org
|
||||
repo: gitea.scubbo.org/scubbo/auto-update-test-app-code
|
||||
tags: ${DRONE_COMMIT_SHA:0:10}
|
||||
username: scubbo
|
||||
password:
|
||||
from_secret: gitea_password
|
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM python:3
|
||||
|
||||
COPY script.py .
|
||||
RUN chmod 700 ./script.py
|
||||
|
||||
CMD ["python3", "./script.py"]
|
23
script.py
Normal file
23
script.py
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
import http.server
|
||||
from http.server import HTTPServer
|
||||
|
||||
|
||||
class HelloWorldRequestHandler(http.server.BaseHTTPRequestHandler):
|
||||
def do_GET(self): # noqa - it is correct for `GET` to be uppercase
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'text/html')
|
||||
self.send_header('X-Clacks-Overhead', 'GNU Terry Pratchett')
|
||||
self.end_headers()
|
||||
|
||||
self.wfile.write(bytes('Hello world!', 'utf8'))
|
||||
|
||||
|
||||
def main():
|
||||
server_address = ('', 8000)
|
||||
httpd = HTTPServer(server_address, HelloWorldRequestHandler)
|
||||
httpd.serve_forever()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
x
Reference in New Issue
Block a user