Skip to content

Instantly share code, notes, and snippets.

Last active Apr 11, 2019
What would you like to do?
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": "",
"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