Files
ServerKit/backend/templates/python-app.yaml
Juan DenisandClaude Fable 5 586f556b93 Reference template icons through the serverkit.ai proxy
Follow-up to 025fa0be: keep serverkit.ai as the stable icon host rather
than jsDelivr. The registry repo remains the canonical home of the logo
files; serverkit.ai proxies /imgs/template-icons/ from its raw tree, so
these URLs now resolve for all 210 logos instead of only the legacy
subset the website bundles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 21:28:14 -04:00

85 lines
1.8 KiB
YAML

id: python-app
name: Python Application
version: "3.12"
description: Custom Python application. Supports Python 3.9-3.12. Perfect for Flask, FastAPI, Django, or any Python project.
icon: https://serverkit.ai/imgs/template-icons/python-app.svg
website: https://www.python.org
documentation: https://docs.python.org/3/
categories:
- development
- api
- custom
variables:
- name: HTTP_PORT
description: HTTP port for the application
type: port
default: "8200"
hidden: true
- name: PYTHON_VERSION
description: Python version (3.9, 3.10, 3.11, 3.12)
type: string
default: "3.12"
- name: APP_PORT
description: Internal app port
type: string
default: "8000"
ports:
- port: 8200
protocol: tcp
description: Web interface
volumes:
- name: app
path: /app
description: Application files (put your Python code here)
requirements:
memory: 256MB
storage: 1GB
compose:
services:
app:
image: python:${PYTHON_VERSION:-3.12}-slim
container_name: ${APP_NAME}
restart: unless-stopped
working_dir: /app
command: >
sh -c "pip install --no-cache-dir -r requirements.txt 2>/dev/null || true &&
python app.py"
ports:
- "${HTTP_PORT}:${APP_PORT:-8000}"
volumes:
- app_data:/app
environment:
- PYTHONUNBUFFERED=1
- PORT=${APP_PORT:-8000}
volumes:
app_data:
post_install: |
Your Python application is ready!
To add your code:
docker cp ./your-files/. ${APP_NAME}:/app/
To access shell:
docker exec -it ${APP_NAME} bash
To install packages:
docker exec -it ${APP_NAME} pip install flask
Example app.py:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World!'
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8000)