PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, September 26, 2022

[FIXED] How to explain to AWS CodeDeploy how to deploy my NodeJS application?

 September 26, 2022     amazon-web-services, aws-code-deploy, continuous-deployment, node.js     No comments   

Issue

I'm sorry in advance for asking this question, AWS has countless tutorials (and much blogs tackle AWS in general), but I can't put my hand on a simple tutorial on how to explain to CodeDeploy how to deploy my code.

I'm fairly confident that I understand the basics of EC2, Auto-scaling groups & CodeDeploy, but what I can't find is how to explain to CodeDeploy how to deploy my app. When I use CodeDeploy, I click on a button 'Deploy', but how come CodeDeploy knows what to do?

In order to deploy effectively, CodeDeploy would need to :

  • Pull the source
  • Run npm install
  • Run npm start

Nothing fancy, but still, I don't know where to explain that. My guess is that there's some configuration file somewhere in the project (most likely in yaml format) to specify those intructions but I find no tutorial clearly explaining such thing.

Just to be clear, I don't want to :

  • Manually connect to my instance to do such instructions, I need them to be automatic
  • Use config files to specify architecture params (I use the console for that purpose). I just want to explain how to run my app.

Any help would be welcome, and if I'm completely mistaken on how to do such things, please do not hesitate to point me to the right direction!


Solution

My guess is that there's some configuration file

Yes, that's correct. When you deploy your app, CD will look for appspec.yml which contains all the build and setup instructions for your app on the instances.

So you have to create such a file tailored to your use-case. AWS docs have example for that.



Answered By - Marcin
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing