Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .containifyci/containifyci.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,27 @@ import (
"github.com/containifyci/engine-ci/protos2"
)

func registryAuth() map[string]*protos2.ContainerRegistry {
return map[string]*protos2.ContainerRegistry{
"docker.io": {
Username: "env:DOCKER_USER",
Password: "env:DOCKER_TOKEN",
},
"ghcr.io": {
Username: "USERNAME",
Password: "env:GHCR_TOKEN",
},
}
}

func main() {
os.Chdir("../")

// Build Group 0
enginepython := build.NewPythonServiceBuild("engine-python")
enginepython.Folder = "."
enginepython.File = "engine_python"
enginepython.Registries = registryAuth()

//TODO: adjust the registries to your own container registry
build.BuildGroups(
Expand Down
4 changes: 4 additions & 0 deletions app.py → engine_python.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# app.py
import uvicorn
from fastapi import FastAPI

app = FastAPI()

@app.get("/hello")
def hello(name: str = "world"):
return {"message": f"hello {name}."}

if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
[project]
name = "engine-python"
name = "engine_python"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"fastapi>=0.119.0",
"fastapi[standard]>=0.119.0",
"uvicorn>=0.37.0",
]

[tool.setuptools]
py-modules = ["engine_python"]

[project.scripts]
engine-python = "engine_python:main"