Files
ServerKit/backend/templates/python-app.yaml
T
Juan DenisandClaude Opus 4.5 cab18a32b7 Consolidate templates into backend/templates marketplace
- Removed duplicate root templates/ folder
- Added PHP, Python, Node.js templates to marketplace (YAML format)
- Templates now installable via web UI Templates page
- CLI create-app now points users to web UI
- All 63 templates in one place: backend/templates/

New templates:
- php-app: Custom PHP 8.0-8.3 with Apache
- python-app: Custom Python 3.9-3.12 (Flask/FastAPI/Django)
- node-app: Custom Node.js 18-21 (Express/Next.js)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:23:50 -05:00

84 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://www.python.org/static/community_logos/python-logo-generic.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"
- 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)