Required files
Upsun uses a YAML configuration file to control your application’s behavior. Place this file inside a.upsun/ folder at the root of your source code:
Example file structure
Terminal
upsun project:init command does the following:
- Detects your framework automatically. If it can’t, it asks which runtime language your codebase uses.
- Asks if you want to add any services.
- Generates the
.upsun/config.yamland.environmentfiles.
applications: configuration for all applications within an environmentservices: configuration for all services within an environmentroutes: configuration for how requests are handled by the router
For more information on the structure of this configuration file, see the YAML structure page.
Committing variables
An additional.environment file may be located at the root of your source code. This file contains Upsun-specific environment variables.Terminal
By default, Upsun uses default resources for each of your services and apps. You can adjust these resources.
Errors on first push
If you push code without an Upsun configuration, the following error appears:- Using Upsun CLI
- Using Console
Configuration errors
Theproject:init command uses your responses and framework-detection logic to generate a starting configuration. Because every project is different, the generated configuration may not cover all your requirements.
Upsun provides a customizable configuration schema you can adjust for your package manager, environment variables, builds, deploys, workers, crons, and other requirements.
To explore what might still be needed, see the language-specific configuration pages:
Next steps
After deployment, Upsun sets resources for your application and service containers automatically:Each time you create a new branch, your new environment inherits its parent environment’s resource allocation.
