@ossy/deployment-tools 0.0.88 → 0.0.89
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/deployment-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.89",
|
|
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",
|
|
@@ -27,7 +27,7 @@ class DockerService {
|
|
|
27
27
|
|
|
28
28
|
static stopContainer(deploymentRequest) {
|
|
29
29
|
logInfo({ message: `[DockerService] Stopping container for ${deploymentRequest.domain}` })
|
|
30
|
-
return exec(`docker stop
|
|
30
|
+
return exec(`docker stop c-${deploymentRequest.domain}`)
|
|
31
31
|
.catch(() => {}) // no worries if container isn't there
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -53,7 +53,7 @@ class DockerService {
|
|
|
53
53
|
return DockerService.getUnusedPort()
|
|
54
54
|
.then(hostPort => {
|
|
55
55
|
logInfo({ message: `[DockerService] Starting container for ${domain} with port mapping ${hostPort}:${containerPort} and source ${imageUrl}` })
|
|
56
|
-
return exec(`docker run -d -p ${hostPort}:${containerPort} --name
|
|
56
|
+
return exec(`docker run -d -p ${hostPort}:${containerPort} --name=c-${domain} --network=${platformConfig.ciDockerNetworkName} --network-alias=c-${domain} --rm ${envsAsString} ${imageUrl}`)
|
|
57
57
|
.then(() => ({ hostPort }))
|
|
58
58
|
.catch(logErrorAndReject(`[DockerService] Could not start container ${image}`))
|
|
59
59
|
})
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/* eslint-disable no-new */
|
|
3
|
-
const { App
|
|
3
|
+
const { App } = require('aws-cdk-lib')
|
|
4
4
|
const { TrustCiStack } = require('./trust-ci-stack')
|
|
5
5
|
const { DeploymentTargetStack } = require('./deployment-target-stack')
|
|
6
6
|
const { DnsStack } = require('./dns-stack')
|
|
7
7
|
const { PlatformTemplateService, DeploymentTemplateService } = require('../template')
|
|
8
8
|
const { PlatformConfigService } = require('../config')
|
|
9
|
-
const { PlatformDeploymentService } = require('../deploy')
|
|
10
9
|
|
|
11
10
|
Promise.all([
|
|
12
11
|
DeploymentTemplateService.readFromFiles(process.env.DEPLOYMENTS),
|