Focus more on creating incredible user experiences and less on Symfony infrastructure management—as well as a few Symfony Demo development tips along the way—with this simple, two-step guide. Learn how to host and configure your Symfony Demo project on Upsun, and get up and running as smoothly as possible.
How to start using Symfony Demo on Upsun
Create an Upsun-ready Symfony Demo
Creating a new Symfony Demo application is simple. Use the following commands to get your Symfony Demo project Upsun-ready, and don’t forget to add --upsun
option to your command to auto-configure your local project for our PaaS:
symfony new my-symfony-app --demo --upsun
cd my-symfony-app
symfony server:start -d #optional
The --upsun
option generates an Upsun YAML configuration file—.upsun/config.yaml
—to manage how your application behaves when deployed on Upsun. This YAML configuration file is located in an .upsun/
folder, at the root of your source code, the architecture of which will look like this:
my-symfony-app
├── .upsun
│ └── config.yaml
└── <project sources>
There are a few basic rules for Upsun configuration:
- The YAML format is used for config files.
- The
.upsun/
folder, containing aconfig.yaml
file, with routes, services, and application configuration shared across all applications, must stay at the root of your project.
Finally, for this step, you need to create an Upsun project using the Symfony CLI.
2. Create an Upsun project and deploy
The next step in setting up your Symfony Demo application on Upsun is to create a project that is simple to do via the Upsun CLI in your terminal. Use this command and follow the prompts to choose the name of your project, region, and many other options:
symfony project:create
Then, deploy your local code to your Upsun project by using the following command:
symfony deploy
When the deployment is complete, browse your website using your favorite browser by using the following command:
symfony environment:url
You’re all set!
Hosting a Symfony application on Upsun has never been so easy—with just the 5 commands detailed above, you can be Up(sun) and running in no time.
symfony new my-symfony-app --demo --upsun
cd my-symfony-app
symfony project:create
symfony deploy
symfony environment:url
Keep an eye out for an upcoming article from me on how to use FrankenPHP in this Symfony Demo application on Upsun—follow us on our social channels to stay up-to-date: Dev.to, Reddit, and Discord.