
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@danmasta/deploy
Advanced tools
Easy deployment to AWS ECR repositories and Elastic Beanstalk environments using docker and aws cli
Features:
We needed a better way to package and deploy apps. This package aims to make deployments to multiple elastic beanstalk apps and environments really simple. It can be used as a non-interactive cmd line utility, required and used programatically, or as an interactive cmd line prompt.
Install globally with npm
npm install -g @danmasta/deploy
Run the deploy script
deploy
For more usage info check out the examples
Options can be passed via cmd line arguments, as an object if you require the package programatically, or stored with your other configuration if using a config package.
Name | Alias | Type | Desription |
---|---|---|---|
name | n | string | Docker image name |
version | v | string | What version to tag the docker image |
ecrUri | u | string | ECR repository uri to push docker image to |
region | r | string|array | AWS region(s) to deploy to |
eb | string|boolean | If true will trigger the elastic beanstalk deploy step | |
ebApp | a | string | Elastic Beanstalk application name |
ebEnv | e | string | Elastic Beanstalk environment name |
ebBucket | b | string | AWS s3 bucket name to push application zip to |
dockerrun | d | string | Where is your projects dockerrun file located |
outputDir | o | string | Where to save application zip before uploading |
silent | s | string|boolean | If false no output will be logged |
interactive | i | string|boolean | If true will trigger interactive mode |
regionList | string|array | List of AWS region(s) to show as selection options in interactive mode | |
help | h | boolean | Show help menu in console |
It's really simple to store default deploy opts in config and just run deploy
Check out the wiki for some basic instructions to help get you started with docker and aws. These may not be exhaustive, but should be enough to get you headed in the right direction
// ./config/default.js
module.exports = {
deploy: {
name: 'my-app',
version: null,
region: 'us-east-1',
eb: true,
ebApp: 'my-app',
ebEnv: 'my-app-prod',
ecrUri: '<ACCOUNT_ID>.dkr.ecr.<REGION>.amazonaws.com',
ebBucket: 'elasticbeanstalk-<REGION>-<ACCOUNT_ID>',
dockerrun: './Dockerrun.aws.json',
outputDir: './dist/deploy',
interactive: true,
regionList: [
'us-west-2',
'us-east-1',
'eu-west-1',
'ap-northeast-1'
]
}
};
// ./config/qa1.js
module.exports = {
deploy: {
ebEnv: 'my-app-qa1',
regionList: [
'us-east-1',
]
}
};
Since this package uses the env and config pacakges, you can easily switch config values with cmd args. So if you have a config structure like this
./config/default.js
./config/production.js
./config/staging.js
./config/qa1.js
./config/qa2.js
You can then load deploy values for a specific environment by just running
deploy --env production --config qa1
deploy --eb -i false -v 2.1.5 -n app -a app -e app-prod -u ... -b ... -r us-east-1 -r ap-south-1
const gulp = require('gulp');
const deploy = require('@danmasta/deploy');
const pkg = require('./package');
gulp.task('deploy', gulp.series('tests'), () => {
return deploy({
interactive: false,
name: 'app',
version: pkg.version,
region: ['us-east-1'],
eb: true,
ebApp: 'app',
ebEnv: 'app-prod',
ecrUri: '...',
ebBucket: '...'
});
});
Check out the wiki for some examples on to configure your dockerrun files. I like to use the AWS multi-docker AMI for my environments, and then just configure one or more containers for each app
If you have any questions feel free to get in touch
FAQs
Deployment tool for aws and docker
The npm package @danmasta/deploy receives a total of 0 weekly downloads. As such, @danmasta/deploy popularity was classified as not popular.
We found that @danmasta/deploy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.