@ossy/deployment-tools 1.17.11 → 1.17.12

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 1.17.12 (2026-05-25)
7
+
8
+ **Note:** Version bump only for package @ossy/deployment-tools
9
+
10
+
11
+
12
+
13
+
6
14
  ## 1.17.11 (2026-05-25)
7
15
 
8
16
  **Note:** Version bump only for package @ossy/deployment-tools
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/deployment-tools",
3
- "version": "1.17.11",
3
+ "version": "1.17.12",
4
4
  "description": "Collection of scripts and tools to aid deployment of containers and static files to Amazon Web Services through GitHub Actions",
5
5
  "source": "./src/index.js",
6
6
  "main": "./src/index.js",
@@ -26,5 +26,5 @@
26
26
  "devDependencies": {
27
27
  "jest": "^27.5.1"
28
28
  },
29
- "gitHead": "c50aee3d73f8c3f71ce2d8a91e9be2de90c6c4d9"
29
+ "gitHead": "c6eb8d3b9ffef1e426fc0e49099d5ea99aa5aa7f"
30
30
  }
@@ -4,6 +4,7 @@
4
4
  * @property {string} platformName - Name of platform
5
5
  * @property {string[]=} sesDomains - list of domains to configure AWS SES email identity and DKIM records for
6
6
  * @property {object} dnsRecords - map of dns records by root domain, only supports MX records so that we can add dns records for our email service
7
+ * @property {Record<string,string>=} env - environment variables written to /etc/environment on the EC2 host at boot time; never uploaded to S3
7
8
  *
8
9
  * @property {string} awsAccountId - Aws account id
9
10
  * @property {string=} awsRegion - ?
@@ -71,7 +71,7 @@ class ContainerDeploymentTarget extends Construct {
71
71
  )
72
72
 
73
73
  const platformConfigDeployment = new BucketDeployment(this, 'PlatformConfigDeployment', {
74
- sources: [Source.jsonData('platform-config.json', { ...props.config, awsRoleToAssume: undefined })],
74
+ sources: [Source.jsonData('platform-config.json', { ...props.config, awsRoleToAssume: undefined, env: undefined })],
75
75
  destinationBucket: props.bucket,
76
76
  // Default prune:true would delete every other object (e.g. media/*) on each infra deploy.
77
77
  prune: false
@@ -108,6 +108,9 @@ class ContainerDeploymentTarget extends Construct {
108
108
 
109
109
  const userData = UserData.forLinux()
110
110
 
111
+ // Write platform env vars to /etc/environment so all systemd services pick them up.
112
+ const envLines = Object.entries(props.config.env ?? {}).map(([k, v]) => `${k}=${v}`)
113
+
111
114
  userData.addCommands(
112
115
  'sudo groupadd docker',
113
116
  'sudo usermod -aG docker ubuntu',
@@ -118,6 +121,8 @@ class ContainerDeploymentTarget extends Construct {
118
121
  ...getInstallDocker(),
119
122
  'sudo apt-get install awscli --yes',
120
123
  ...AwsProfile.writeFile(role.roleArn, SupportedRegions.North),
124
+ // Write all platform env vars before starting any service
125
+ `sudo tee /etc/environment << 'ENVEOF'\n${envLines.join('\n')}\nENVEOF`,
121
126
  // Create shared Docker network for inter-container communication
122
127
  'docker network create ossy-network || true',
123
128
  ...CaddyService.install(),