This commit is contained in:
15
.drone.yml
Normal file
15
.drone.yml
Normal file
@ -0,0 +1,15 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: rubble.se:5000/hello-drone
|
||||
tags: latest
|
||||
username:
|
||||
from_secret: urban
|
||||
password:
|
||||
from_secret: latkotte
|
||||
|
||||
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 5000
|
||||
CMD ["python", "app.py"]
|
||||
|
||||
10
app.py
Normal file
10
app.py
Normal file
@ -0,0 +1,10 @@
|
||||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
def hello():
|
||||
return "<h1>Hello, Drone CI!</h1>"
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port=5000)
|
||||
|
||||
2
requirement.txt
Normal file
2
requirement.txt
Normal file
@ -0,0 +1,2 @@
|
||||
flask==2.2.5
|
||||
|
||||
Reference in New Issue
Block a user