Application
Given this configuration, you should achieve the following outcome after completing this page:
| Configuration | |
|---|---|
| Environment | pirates-dev |
| AppName | too-tikki |
| Outcome | |
| ECR | pirates-dev-too-tikki |
| URL | https://too-tikki.pirates-dev.oslo.systems/ |
Step 1: Add and configure the app package
Update package-config.yml to enable the components you need. You can use the following configuration to set up a minimal application running on nginx with an internet-facing address:
# Attribute reference:
# https://github.com/oslokommune/golden-path-boilerplate/blob/main/boilerplate/terraform/app/boilerplate.yml
StackName: "app-too-tikki"
app-data.StackName: "app-too-tikki-data"
AppName: "too-tikki"
AppEcsExec: false
AppReadOnlyRootFileSystem: false
ExampleImage:
Enable: true
Ecr:
Enable: false
ServiceConnect:
Enable: false
AlbHostRouting:
Enable: true
Internal: false
Subdomain:
Enable: true
TargetGroupTargetStickiness: false
DatabaseConnectivity:
Enable: false
DailyShutdown:
Enable: false
IamForCicd:
Enable: false
TelemetryCollection:
Enable: false
Step 2: Install the package
Step 3: Apply in this order (required)
Order matters: Apply data first, then app. The app stack depends on resources created by the data stack.
1) Apply the data stack (required first)
Creates ECR, CloudWatch log groups, and other data resources.
2) Apply the app stack (run second)
Creates the ECS service and other application resources.
Step 4: Verify
Verify in the AWS CLI
To verify that ECR is correctly set up, run the following command:
The output list should contain the name of the ECR repository.
Verify in the AWS console
Login to the AWS console and navigate to ECR. Select Repositories in the left-hand menu.
The list should contain the name of the ECR repository.
Verify in the browser
Go to https://too-tikki.pirates-dev.oslo.systems/ and you should see the default Nginx page. Change URL according to your environment and application name.
Commit your files
At this stage it is a good idea to commit your files.