@dotcom-tool-kit/containerised-app-with-assets 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.
Files changed (3) hide show
  1. package/.toolkitrc.yml +42 -0
  2. package/package.json +34 -0
  3. package/readme.md +49 -0
package/.toolkitrc.yml ADDED
@@ -0,0 +1,42 @@
1
+ plugins:
2
+ - '@dotcom-tool-kit/containerised-app'
3
+ - '@dotcom-tool-kit/upload-assets-to-s3'
4
+ - '@dotcom-tool-kit/webpack'
5
+
6
+ commands:
7
+ 'run:local':
8
+ - Webpack:
9
+ envName: development # run a webpack compile before starting the server because dotcom-server-asset-loader expects a manifest to exist
10
+ - Node
11
+ - Webpack:
12
+ envName: development
13
+ watch: true
14
+ 'deploy:review': [] # Coming soon, see https://financialtimes.atlassian.net/browse/CPREL-1280
15
+ 'deploy:staging':
16
+ - Webpack:
17
+ envName: production
18
+ - UploadAssetsToS3
19
+ - DockerAuthCloudsmith
20
+ - DockerBuild
21
+ - DockerPush
22
+ - AwsAssumeRole:
23
+ roleArn: !toolkit/option '@dotcom-tool-kit/containerised-app.awsRoleArnStaging'
24
+ - HakoDeploy:
25
+ environments:
26
+ - ft-com-test-eu
27
+ 'deploy:production':
28
+ - DockerAuthCloudsmith
29
+ - AwsAssumeRole:
30
+ roleArn: !toolkit/option '@dotcom-tool-kit/containerised-app.awsRoleArnProduction'
31
+ # HACK: the `environments` property under `HakoDeploy` gets fully overridden by the `environments`
32
+ # property under the !toolkit/if-defined if multiregion is true. We'll refactor this later when
33
+ # we decide what new YAML tags we need
34
+ - HakoDeploy:
35
+ environments:
36
+ - ft-com-prod-eu
37
+ !toolkit/if-defined '@dotcom-tool-kit/containerised-app.multiregion':
38
+ environments:
39
+ - ft-com-prod-eu
40
+ - ft-com-prod-us
41
+
42
+ version: 2
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@dotcom-tool-kit/containerised-app-with-assets",
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-with-assets"
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-with-assets",
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/containerised-app": "^0.1.0",
30
+ "@dotcom-tool-kit/upload-assets-to-s3": "^4.2.7",
31
+ "@dotcom-tool-kit/webpack": "^4.2.7",
32
+ "zod": "^3.24.1"
33
+ }
34
+ }
package/readme.md ADDED
@@ -0,0 +1,49 @@
1
+ # dotcom-tool-kit/containerised-app-with-assets
2
+
3
+ A bootstrap plugin that provides the required Tool Kit plugins for a containerised application that's deployed to Amazon Elastic Container Service (ECS), additionally supporting building and uploading assets to S3.
4
+
5
+ - [`@dotcom-tool-kit/containerised-app`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/containerised-app)
6
+ - [`@dotcom-tool-kit/upload-assets-to-s3`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/upload-assets-to-s3)
7
+ - [`@dotcom-tool-kit/webpack`](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/webpack)
8
+
9
+ This bootstrap plugin is also preconfigured to run the `Webpack` and `Node` tasks on the command `run:local`.
10
+
11
+ ## Installation & Usage
12
+
13
+ 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:
14
+
15
+ ```sh
16
+ npm install --save-dev @dotcom-tool-kit/containerised-app-with-assets
17
+ ```
18
+
19
+ And add it to your repo's `.toolkitrc.yml`:
20
+
21
+ ```yml
22
+ plugins:
23
+ - '@dotcom-tool-kit/containerised-app-with-assets'
24
+ ```
25
+
26
+ This plugin is only configured with the options of the plugins it depends on. You'll need to specify plugin options for the `cloudsmith`, `containerised-app`, and `docker` plugins. The bare minimum is:
27
+
28
+ ```yml
29
+ options:
30
+ plugins:
31
+ '@dotcom-tool-kit/cloudsmith':
32
+ serviceAccount: <SERVICE_ACCOUNT_WITH_WRITE_ACCESS>
33
+ '@dotcom-tool-kit/containerised-app':
34
+ awsRoleArnStaging: <STAGING_ROLE_ARN>
35
+ awsRoleArnProduction: <PRODUCTION_ROLE_ARN>
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/containerised-app` plugin options](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/containerised-app#plugin-wide-options)
46
+ - [`@dotcom-tool-kit/docker` plugin options](https://github.com/Financial-Times/dotcom-tool-kit/tree/main/plugins/docker#plugin-wide-options)
47
+
48
+ <!-- begin autogenerated docs -->
49
+ <!-- end autogenerated docs -->