简体   繁体   中英

Continuous deployment for node.js applications using CI and CodeDeploy

I am having trouble figuring out how to setup continuous deployment for my node.js application (through aws CodeDeploy). So far I completed following steps:

  1. Created IAM user with required permissions
  2. Created Elastic Beanstalk instance running node.js
  3. Created CodeDeploy application and linked it to my EC2 instance and IAM user

I have also signed up and set up tests to use with CircleCI a CI I will use for my deployment.

Now I am stuck at stage where I need to create an appspec.yml file that will correctly deploy the application. I am not sure about this one at all, ie what source / destination should I specify etc.. Do I need to run my npm build script (creates dist/ folder) at this stage or during my CircleCI tests / builds?

The source is the source of the files that will be deployed. The destination is the place where the files will be deployed to. You might want to run npm build after the files are copied over to the host (you can do this in AfterInstall hook). A list of available hooks as well as the detailed documentations are available here: http://docs.aws.amazon.com/codedeploy/latest/userguide/app-spec-ref.html for further reference.

Also please be more specific about the questions you have. It is hard to deduce what problems you are experiencing from etc. .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM