Skip to content

svc init command

David Killmon edited this page Jun 25, 2020 · 4 revisions
$ ecs-preview app init

What does it do?

ecs-preview app init creates a new CLI app for you.

After running this command, the CLI creates sub-directory with your app name in your local ecs-project. And you'll see a manifest file in it. Feel free to update your manifest file to change the default configs for your app. The CLI also sets up an ECR repo with a policy for all environments to be able to pull from it. Then, your app gets registered to AWS System Manager Parameter Store so that the CLI can keep track of your app.

After that, if you already have an environment set up, you can run ecs-preview app deploy to deploy your app in that environment.

What are the flags?

Required Flags
  -t, --app-type string     Type of application to create. Must be one of:
                            "Load Balanced Web App", "Backend App"
  -d, --dockerfile string   Path to the Dockerfile.
  -n, --name string         Name of the application.

Load Balanced Web App Flags
      --port uint16   Optional. The port on which your Dockerfile listens.

Backend App Flags
      --port uint16   Optional. The port on which your Dockerfile listens.

Each application type has its own optional and required flags besides the common required flags. To create a "frontend" load balanced web application.

$ ecs-preview app init --name frontend --app-type "Load Balanced Web App" --dockerfile ./frontend/Dockerfile

What does it look like?

ecs-preview app init

Clone this wiki locally