Running on Galaxy Legacy? Visit the legacy docs.
Galaxy
Web Apps

Python

Deploy your Python app on Galaxy with zero-downtime deploys and autoscaling.

Deploy your Python app on Galaxy with zero-downtime deploys and autoscaling.

Prerequisites


1. Prepare Your App

Galaxy installs your dependencies and runs your start command. Two things are required:

Listen on the PORT environment variable:

import os
port = int(os.getenv('PORT', 5000))
app.run(host='0.0.0.0', port=port)

List your dependencies in requirements.txt:

Flask==2.3.0
gunicorn==20.1.0

2. Deploy

Connect your repo

Go to your Galaxy dashboard, click Create New, then Deploy New App. Select Python as the app type and connect your GitHub or Bitbucket account.

Select repo and branch

Pick your repository and the branch to deploy from (usually main).

Choose plan and container

Select a plan (Sandbox for testing, Production for live apps) and a container size. Start small, scale later.

Configure and deploy

Set your app name, region, start command (e.g., gunicorn app:app or python main.py), and any environment variables. Hit Deploy.

Galaxy installs your dependencies via pip install -r requirements.txt and starts your app.

Every push to your deploy branch triggers a new deployment automatically.

Install the CLI

npm install -g @galaxy-cloud/cli

Log in

galaxy login

Deploy

From your project root:

galaxy deploy my-app-name

For more CLI options, see the Galaxy CLI guide.


3. Configure (Optional)

Start command: Set how Galaxy starts your app (e.g., gunicorn app:app, uvicorn main:app --host 0.0.0.0).

Health check path: Point Galaxy at an endpoint like /health so it can verify your app is running.

Environment variables: Set PYTHONUNBUFFERED=1 for proper log output. See the Python Reference for a full list.


4. Try It


Troubleshooting


What's Next?