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)