Files
Juan Denis 3ca6bd23a9 Update template icons and enhance sidebar user menu
Switched all template icon URLs to use local /serverkit.ai/imgs/template-icons/ assets for consistency and reliability. Improved the Sidebar component with a new user context menu featuring theme switching, settings navigation, and logout, along with conditional display of the WordPress pipeline link. Added and updated related styles for the sidebar, user menu, and page headers, and introduced new theme variables for code/terminal backgrounds.
2026-01-27 20:53:57 -05: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)