Skip to content

Instantly share code, notes, and snippets.

@nickdandakis
Last active April 11, 2019 10:44
Show Gist options
  • Save nickdandakis/3604ffa8e819e60c97665a557f0ae74a to your computer and use it in GitHub Desktop.
Save nickdandakis/3604ffa8e819e60c97665a557f0ae74a to your computer and use it in GitHub Desktop.
Next.js + AWS Elastic Beanstalk + AWS EC2 Container Service + Docker package.json
{
"name": "this-web-scale",
"version": "0.0.1",
"scripts": {
"dev": "node server.js",
"build": "NODE_ENV=production next build",
"start": "NODE_ENV=production node server.js",
"dockerize": "npm run build:docker && npm run tag:docker && npm run push:docker && npm run tag-latest:docker && npm run push-latest:docker",
"deploy": "eb use this-web-scale-production && eb deploy --label v$npm_package_version --verbose",
"build:docker": "docker build -t $npm_package_config_docker_image:$npm_package_version -t $npm_package_config_docker_image:latest .",
"tag:docker": "docker tag $npm_package_config_docker_image $npm_package_config_docker_repo/$npm_package_config_docker_image:$npm_package_version",
"tag-latest:docker": "docker tag $npm_package_config_docker_image $npm_package_config_docker_repo/$npm_package_config_docker_image:latest",
"push:docker": "docker push $npm_package_config_docker_repo/$npm_package_config_docker_image:$npm_package_version",
"push-latest:docker": "docker push $npm_package_config_docker_repo/$npm_package_config_docker_image:latest",
"login:docker": "eval $(aws ecr get-login --no-include-email --region us-east-1)",
},
"config": {
"docker": {
"repo": "bestest-aws-org.dkr.ecr.us-east-1.amazonaws.com",
"image": "token/this-web-scale"
}
},
"dependencies": {
...
},
"devDependencies": {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment