Git Product home page Git Product logo

nuxt-ecs-sample's Introduction

nuxt-ecs-sample

Build Setup

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate

For detailed explanation on how things work, check out Nuxt.js docs.

Docker

$ docker pull nginx
$ docker build -t nuxt-ecs-sample:1.0.0 .
$ docker run -p 8080:80 nuxt-ecs-sample:1.0.0
# Open localhost:8080 in your browser

ECR

# Create ECR repository
$ aws ecr create-repository --repository-name nuxt-ecs-sample

# Add a tag to docker image
$ docker tag nuxt-ecs-sample:1.0.0 <AWS_ACCOUNT_ID>.dkr.ecr.ap-northeast-1.amazonaws.com/nuxt-ecs-sample:1.0.0

# Login ECR
$ aws ecr get-login-password --region ap-northeast-1 | \
  docker login --username AWS --password-stdin <AWS_ACCOUNT_ID>.dkr.ecr.ap-northeast-1.amazonaws.com/nuxt-ecs-sample

# Push docker image to ECR
$ docker push <AWS_ACCOUNT_ID>.dkr.ecr.ap-northeast-1.amazonaws.com/nuxt-ecs-sample:1.0.0

Register task definition

$ aws ecs register-task-definition --cli-input-json file://deploy\/taskdef.json

Creat ECS service

  1. Create ECS Cluster in AWS console.(nuxt-ecs-sample-cluster)
  2. Creat ECS sercice with AWS CLI
$ aws ecs create-service --service-name nuxt-service --cli-input-json file://deploy\/create-service.json

# Confirm
$ aws ecs describe-services --cluster nuxt-ecs-sample-cluster --services nuxt-service

nuxt-ecs-sample's People

Contributors

shgtkshruch avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.