So basically I have a CodePipeline whose CodeBuild uses the following basic buildspec to deploy a Strapi project to EB:
version: 0.2
phases:
install:
runtime-versions:
nodejs: 18
pre_build:
commands:
- npm i -f
build:
commands:
- npm run build
post_build:
commands:
- rm -rf node_modules
artifacts:
files:
- '**/*'
And I've used multiple ones, but generally it always passes and my /var/app/current matches what I have locally, but for some reason I always get the error saying:
Server wasn't able to start properly.
Aug 30 14:46:26 ip-172-31-36-178 web[4340]: [2023-08-30T14:46:26.329Z] error
Error: Missing api folder. Please create one in your app root directory
which I obviously don't get locally. Now I'm new to strapi and maybe there something I need to do in order to make this work on EB?
I've checked the file permissions on EB, I've made sure that my Node and NPM versions match across my machine and EB so I'm currently just confused. I'm happy to share any additional info.
I've tried following the top 2 answers here in order to get here: Deploy strapi to elastic beanstalk