I deploy a node.js application with express to elastic beanstalk and my structure is like this:
project
├── app.js
├── client
├── apps
│ ├── app1
│ │ ├── models
│ │ ├── controllers
│ │ └── routers
│ └── app2
├── utils
├── views
├── logs
├── scripts
├── public
├── node_modules
├── .elasticbeanstalk
├── .ebextensions
I serve my static files in public directory with:
{
"option_settings": [
{
"option_name": "/public",
"namespace": "aws:elasticbeanstalk:container:nodejs:staticfiles",
"value": "/public"
},
]
}
in aws config files in .ebextensions directory. but when I want to update code with
eb deploy
aws replace all "/var/app/current/" with project directory so all static files in server deleted. Is aws pipelines help me? or any other solution?
thank you for your help.