- Create/change features
- Make changes on non-master branch
Push to Github, create PR to merge with master
- Code pushed to Travis CI
- Test run
Merge PR with master
- Code pushed to Travis CI
- Tests run
- Deploy to AWS Elastic Beanstalk
- Get the image needed
- Creates a working directory
- Copies package.json from root dir
- Runs npm install
- Copies all files from root dir
- Runs command 'npm run start'
- Builds two 'Services', a web service and a test service
- The
volumes
param is like a --watch on certain dirs and will auto update on change - Noice how we give the second service tests a new command to run
which is easier than running
docker exec -it <CONTAINER_ID> npm run test
Note: Nginx is used to handle server requests inside our container
- Uses node:alpine
- Copy package.json
- Install dependencies
- Run 'npm run build'
- Uses nginx
- Exposes a port (default is 80)
- Copy --from=builder (our named first build) /app/build /usr/share/nginx/html
All the extra stuff created during the Build Phase is not brought over, only files from /app/build