@dotcom-tool-kit/containerised-app 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.toolkitrc.yml +38 -0
- package/package.json +37 -0
- package/readme.md +59 -0
package/.toolkitrc.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
plugins:
|
|
2
|
+
- '@dotcom-tool-kit/aws'
|
|
3
|
+
- '@dotcom-tool-kit/cloudsmith'
|
|
4
|
+
- '@dotcom-tool-kit/docker'
|
|
5
|
+
- '@dotcom-tool-kit/doppler'
|
|
6
|
+
- '@dotcom-tool-kit/hako'
|
|
7
|
+
- '@dotcom-tool-kit/node'
|
|
8
|
+
|
|
9
|
+
commands:
|
|
10
|
+
'run:local':
|
|
11
|
+
- Node
|
|
12
|
+
'deploy:review': [] # Coming soon, see https://financialtimes.atlassian.net/browse/CPREL-1280
|
|
13
|
+
'deploy:staging':
|
|
14
|
+
- DockerAuthCloudsmith
|
|
15
|
+
- DockerBuild
|
|
16
|
+
- DockerPush
|
|
17
|
+
- AwsAssumeRole:
|
|
18
|
+
roleArn: !toolkit/option '@dotcom-tool-kit/containerised-app.awsRoleArnStaging'
|
|
19
|
+
- HakoDeploy:
|
|
20
|
+
environments:
|
|
21
|
+
- ft-com-test-eu
|
|
22
|
+
'deploy:production':
|
|
23
|
+
- DockerAuthCloudsmith
|
|
24
|
+
- AwsAssumeRole:
|
|
25
|
+
roleArn: !toolkit/option '@dotcom-tool-kit/containerised-app.awsRoleArnProduction'
|
|
26
|
+
# HACK: the `environments` property under `HakoDeploy` gets fully overridden by the `environments`
|
|
27
|
+
# property under the !toolkit/if-defined if multiregion is true. We'll refactor this later when
|
|
28
|
+
# we decide what new YAML tags we need
|
|
29
|
+
- HakoDeploy:
|
|
30
|
+
environments:
|
|
31
|
+
- ft-com-prod-eu
|
|
32
|
+
!toolkit/if-defined '@dotcom-tool-kit/containerised-app.multiregion':
|
|
33
|
+
environments:
|
|
34
|
+
- ft-com-prod-eu
|
|
35
|
+
- ft-com-prod-us
|
|
36
|
+
|
|
37
|
+
optionsSchema: ./schema
|
|
38
|
+
version: 2
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dotcom-tool-kit/containerised-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
6
|
+
},
|
|
7
|
+
"keywords": [],
|
|
8
|
+
"author": "FT.com Platforms Team <platforms-team.customer-products@ft.com>",
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"description": "",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/financial-times/dotcom-tool-kit.git",
|
|
14
|
+
"directory": "plugins/containerised-app"
|
|
15
|
+
},
|
|
16
|
+
"bugs": "https://github.com/financial-times/dotcom-tool-kit/issues",
|
|
17
|
+
"homepage": "https://github.com/financial-times/dotcom-tool-kit/tree/main/plugins/containerised-app",
|
|
18
|
+
"files": [
|
|
19
|
+
".toolkitrc.yml",
|
|
20
|
+
"index.js"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": "18.x || 20.x || 22.x"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"dotcom-tool-kit": "4.x"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@dotcom-tool-kit/aws": "^0.1.2",
|
|
30
|
+
"@dotcom-tool-kit/cloudsmith": "^1.0.1",
|
|
31
|
+
"@dotcom-tool-kit/docker": "^0.3.2",
|
|
32
|
+
"@dotcom-tool-kit/doppler": "^2.1.7",
|
|
33
|
+
"@dotcom-tool-kit/hako": "^0.1.3",
|
|
34
|
+
"@dotcom-tool-kit/node": "^4.2.9",
|
|
35
|
+
"zod": "^3.24.1"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# dotcom-tool-kit/containerised-app
|
|
2
|
+
|
|
3
|
+
A bootstrap plugin that provides the minimum required Tool Kit plugins for a containerised application that's deployed to Amazon Elastic Container Service (ECS).
|
|
4
|
+
|
|
5
|
+
- [`@dotcom-tool-kit/aws`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/aws)
|
|
6
|
+
- [`@dotcom-tool-kit/cloudsmith`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/cloudsmith)
|
|
7
|
+
- [`@dotcom-tool-kit/docker`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/docker)
|
|
8
|
+
- [`@dotcom-tool-kit/doppler`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/doppler)
|
|
9
|
+
- [`@dotcom-tool-kit/hako`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/hako)
|
|
10
|
+
- [`@dotcom-tool-kit/node`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/node)
|
|
11
|
+
|
|
12
|
+
This bootstrap plugin is also preconfigured to run the `Node` task on the command `run:local`.
|
|
13
|
+
|
|
14
|
+
## Installation & Usage
|
|
15
|
+
|
|
16
|
+
With Tool Kit [already set up](https://github.com/financial-times/dotcom-tool-kit#installing-and-using-tool-kit), install this plugin as a dev dependency:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm install --save-dev @dotcom-tool-kit/containerised-app
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
And add it to your repo's `.toolkitrc.yml`:
|
|
23
|
+
|
|
24
|
+
```yml
|
|
25
|
+
plugins:
|
|
26
|
+
- '@dotcom-tool-kit/containerised-app'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
As well as the plugin options outlined below, you'll need to specify plugin options for the `cloudsmith` and `docker` plugins. The bare minimum is:
|
|
30
|
+
|
|
31
|
+
```yml
|
|
32
|
+
options:
|
|
33
|
+
plugins:
|
|
34
|
+
'@dotcom-tool-kit/cloudsmith':
|
|
35
|
+
serviceAccount: <SERVICE_ACCOUNT_WITH_WRITE_ACCESS>
|
|
36
|
+
'@dotcom-tool-kit/docker':
|
|
37
|
+
images:
|
|
38
|
+
web:
|
|
39
|
+
name: <YOUR_APP_NAME>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
See the relevant documentation for further options:
|
|
43
|
+
|
|
44
|
+
- [`@dotcom-tool-kit/cloudsmith` plugin options](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/cloudsmith#plugin-wide-options)
|
|
45
|
+
- [`@dotcom-tool-kit/docker` plugin options](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/docker#plugin-wide-options)
|
|
46
|
+
|
|
47
|
+
<!-- begin autogenerated docs -->
|
|
48
|
+
## Plugin-wide options
|
|
49
|
+
|
|
50
|
+
### `@dotcom-tool-kit/containerised-app`
|
|
51
|
+
|
|
52
|
+
| Property | Description | Type |
|
|
53
|
+
| :------------------------------ | :------------------------------------------------------------ | :----------------------------------------------- |
|
|
54
|
+
| **`awsRoleArnStaging`** (\*) | the ARN of an IAM role to assume when deploying to staging | `string` (_regex: `/^arn:aws:iam::\d+:role\//`_) |
|
|
55
|
+
| **`awsRoleArnProduction`** (\*) | the ARN of an IAM role to assume when deploying to production | `string` (_regex: `/^arn:aws:iam::\d+:role\//`_) |
|
|
56
|
+
| `multiregion` | Whether the app is deployed across both EU and US regions | `true` |
|
|
57
|
+
|
|
58
|
+
_(\*) Required._
|
|
59
|
+
<!-- end autogenerated docs -->
|