Skip to main content
When you create a new workspace, Conductor will copy in all your git files. To get any other files you need—like dependencies, .env files, or build files—use a setup script.

Example

conductor.json:
{
    "scripts": {
        "setup": "./conductor-setup.sh"
    }
}
conductor-setup.sh:
# Install dependencies
npm install

# Copy .env file
cp $CONDUCTOR_ROOT_PATH/.env .env

# Build the app
npm run build

How it works

The setup script runs in your new workspace directory ($CONDUCTOR_WORKSPACE_PATH) as soon as it’s created. In this example, we copy the .env file from the repository root directory ($CONDUCTOR_ROOT_PATH) into each new workspace. The repo root directory is a good place to store files you might want to share across workspaces. You can copy or symlink them depending on your needs.

More tips

Here’s the setup script we use for Conductor and a walkthrough of how it works:

Next steps

For long-running processes that should run in the background while you develop, add a run script. For more details about how setup scripts work, see Scripts.