Configuring Build and Start Commands | Seenode Docs

Configuring Build and Start Commands

Learn how to configure build and start commands for your applications on **seenode** to ensure proper deployment and execution.

The build command and start command are essential for preparing and running your application on seenode.

  • The build command installs dependencies and compiles or prepares your application for execution.
  • The start command starts your application, making it available for requests.

seenode attempts to automatically detect these commands, but you can customize them based on your project’s needs.

Framework Examples

Here are some common examples for different frameworks.

Build Command

Terminal
npm install

Start Command

Terminal
node server.js

Build Command

Terminal
pip install -r requirements.txt

Start Command

Terminal
uvicorn main:app --host 0.0.0.0 --port 8000

Build Command

Terminal
pip install -r requirements.txt

Start Command

Terminal
gunicorn my-project.wsgi --bind 0.0.0.0:8000
Tip

For production, it is recommended to use a production-ready web server like Gunicorn instead of Django’s runserver.

Build Command

Terminal
go build -o app .

Start Command

Terminal
./app

::::note Use the Port input during service setup to tell seenode where your application listens. Bind your start command to the same port on 0.0.0.0 (for example, --port 8000). Avoid relying on a PORT environment variable. ::::

Advanced Usage

Sometimes, you need to run additional commands as part of your build or start process. You can chain commands using &&.

Running Database Migrations

It’s a common practice to run database migrations before starting the application.

  1. Chain the commands

    You can add the migration command to your start command, separated by &&.

    Django Example

    Terminal
    python manage.py migrate && gunicorn my-project.wsgi --bind 0.0.0.0:8000

    FastAPI with Alembic Example

    Terminal
    alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port 8000
  2. Use a startup script

    For more complex startup sequences, you can create a script.

    startup.sh

    startup.sh
    #!/bin/sh
    # Run migrations
    python manage.py migrate
    # Start the application
    gunicorn my-project.wsgi --bind 0.0.0.0:8000

    Make the script executable: chmod +x startup.sh

    Then, set your start command to:

    Terminal
    ./startup.sh