Local development
Back to home
On this page
Once your Strapi application has been deployed on Upsun, you might want to start developing your application locally.
If you’re new to Upsun, you might want to check out the philosophy of Upsun to get started on the best possible footing.
Before you begin
You need:
- Git. Git is the primary tool to manage everything your app needs to run. Push commits to deploy changes and control configuration through YAML files. These files describe your infrastructure, making it transparent and version-controlled.
- A Upsun account. If you don’t already have one, register for a trial account. You can sign up with an email address or an existing GitHub, Bitbucket, or Google account. If you choose one of these accounts, you can set a password for your Upsun account later.
- Required: the Upsun CLI. This lets you interact with your project from the command line. You can also do most things through the Web Console, but this guide focuses on using the CLI.
- Install node CLI (version >= 18.x)
- Install Docker Compose locally
Create a MariaDB Docker container
At the root of your project, create a docker-composer.yaml file with the following configuration:
docker-compose.yaml
version: '3.9'
services:
postgres:
image: postgres:15-alpine
ports:
- 3306:5432
volumes:
- ~/apps/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=strapi
- POSTGRES_USER=strapi
- POSTGRES_DB=strapiAnd launch the corresponding Docker container:
Terminal
docker-compose up -d Launch your local Strapi application
To run your Strapi application locally, use the following command:
Terminal
npm run developAnd then it should open your Admin panel using your favorite browser.
You can start developing amazing features!
Note
You might want your colleague to be able to do the same, so feel free to commit your changes on your favorite Git repository to share them with your team.