Skip to main content

Deploy with an agent

Copy agent prompt

Before you start

Connect your AWS account using the Spring Winter quickstart. You need postgreSQL and durable media storage. Check the upstream deployment instructions and pin a release before you deploy. Source repository.

Create and connect the database

  1. Create a private SQL database with PostgreSQL for this deployment. If you already have a database for this deployment, verify that the engine and version match the pinned app release. Wait for the database to be ready.
  2. Open Connect on the database. Use the writer endpoint, port, database name and application credentials. Create the application database and role if needed. Confirm that the application and migration process can reach the private writer.
  3. Set DATABASE_CLIENT=postgres and the host, port, name, username, password and TLS variables read by your project. Put secret values in runtime configuration or the migration process’s secret store.
  4. Build the admin panel using the project’s production build, then start Strapi with the database settings. Wait for startup schema changes before opening /admin.

Configure the deployment

  1. Select a Spring Winter project in the AWS Region you want to use. Use a web server for the HTTP app and configure dependencies before you start it.
  2. Build your Strapi project from GitHub with its production Dockerfile.
  3. Use HOST=0.0.0.0, PORT=1337, NODE_ENV=production and the DATABASE_* settings read by the project.
  4. Supply APP_KEYS and the token salts and secrets documented for the release.
  5. Configure the S3 upload provider before accepting media.
When you run the HTTP app on Spring Winter, set a health path that returns HTTP 200 without signing in. Use Runtime variables for runtime configuration. Task storage is temporary. Verify that every file you need after replacement goes to durable storage.

Verify the deployment

Check the deployment in History if you created Spring Winter compute. Wait for the workflow to succeed, then test the application over HTTPS. Open /admin, create a content item, attach media and fetch the item through the intended API access policy.