Update buildkite
Browse files- Dockerfile +7 -12
- README.md +1 -0
- main.py +11 -2
Dockerfile
CHANGED
@@ -1,12 +1,7 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
# CMD ["bash", "script.sh"]
|
9 |
-
#
|
10 |
-
|
11 |
-
FROM buildkite/agent:ubuntu
|
12 |
-
ENV BUILDKITE_AGENT_TOKEN "c6be0e8718a3894eb2aaa162566a3584461f7d42a962116595"
|
|
|
1 |
+
FROM python:3.11.6-alpine3.18
|
2 |
+
RUN apt-get update && apt-get install -y curl
|
3 |
+
USER tonne
|
4 |
+
WORKDIR /code
|
5 |
+
RUN pip install fastapi uvicorn
|
6 |
+
COPY . /code
|
7 |
+
CMD ["uvicorn", "main:app", "--reload"]
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
@@ -3,6 +3,7 @@ title: Buildkite
|
|
3 |
emoji: 🏆
|
4 |
colorFrom: blue
|
5 |
colorTo: indigo
|
|
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
---
|
|
|
3 |
emoji: 🏆
|
4 |
colorFrom: blue
|
5 |
colorTo: indigo
|
6 |
+
app_port: 8000
|
7 |
sdk: docker
|
8 |
pinned: false
|
9 |
---
|
main.py
CHANGED
@@ -1,4 +1,13 @@
|
|
1 |
import os
|
2 |
-
import
|
3 |
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
+
from fastapi import FastAPI
|
3 |
|
4 |
+
app = FastAPI()
|
5 |
+
|
6 |
+
|
7 |
+
@app.get("/")
|
8 |
+
async def root():
|
9 |
+
return {"message": "Hello World"}
|
10 |
+
|
11 |
+
# import subprocess
|
12 |
+
#
|
13 |
+
# subprocess.run(["~/.buildkite-agent/bin/buildkite-agent", "start"])
|