permalink |
---|
/index.html |
Clace is an open-source Apache-2.0 licensed project building a platform to easily develop and deploy self-hosted web applications. The main repository for Clace source code is clace. This repository has the source for Clace app template specs, which can be used as spec argument during app initialization. For example, --spec python-flask
. See here for details.
App specs allow for existing applications to be used with Clace with no changes required in the application code. Pass the --spec
option during app create
. Clace will include the template files from the spec and bring up the application. If the spec uses containers (most do, proxy
spec is the exception), then Clace will download the source code, add the template spec files, build the image and start a container with that image. API calls are automatically proxied to the application within the container.
Spec Name | Required Params | Optional Params | Supports Path Routing | Notes | Example |
---|---|---|---|---|---|
container |
|
Depends on app | Requires app code to have a Containerfile/Dockerfile | ||
image |
|
Depends on app | No source url required when creating app, use - as url | clace app create --spec image --approve --param image=nginx --param port=80 - nginxapp.localhost:/ |
|
proxy |
|
No | No source url required when creating app, use - as url | clace app create --spec proxy --approve -param url=https://clace.io - proxyapp.localhost:/ |
|
static |
|
Yes | All files under source folder are served | clace app create --spec static --approve --param app_name="Event Planner" -param index=event-planner.html github.com/simonw/tools /event_planner |
|
static_single |
|
Yes | Only the index file is served | clace app create --spec static_single --approve --param app_name="Event Planner" -param index=event-planner.html github.com/simonw/tools /event_planner |
|
python-wsgi |
|
Depends on app | Runs Web Server Gateway Interface (WSGI) apps using gunicorn | ||
python-asgi |
|
Depends on app | Runs Asynchronous Server Gateway Interface (ASGI) apps using uvicorn | ||
python-flask |
|
Depends on app | Runs app using flask dev server | ||
python-streamlit |
|
Yes | clace app create --spec python-streamlit --branch master --approve github.com/streamlit/streamlit-example /streamlit_app |
||
python-streamlit-poetry |
|
Yes | Installs packages using poetry | ||
python-fasthtml |
|
Depends on app | Runs app using uvicorn | clace app create --approve --spec python-fasthtml --param APP_MODULE=basic_ws:app https://github.com/AnswerDotAI/fasthtml/examples fasthtmlapp.localhost:/ |
|
python-gradio |
|
Yes | clace app create --spec python-gradio --approve github.com/gradio-app/gradio/demo/blocks_flag /gradio_app |
||
go |
|
|
Depends on app | CGO is disabled; go.mod has to be present; app should bind to 0.0.0.0 | clace app create --approve --spec go --param port=8080 --param APP_ARGS="-addr 0.0.0.0:8080" --branch master github.com/golang/example/helloserver /goapp |