Both containers are required to run the MFEs locally
-
Localstack: to emulare S3 bucket
- Install aws cli (https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#getting-started-install-instructions)
- Need to install aws cli, hace 2 ways to run aws
- To use aws need to set the endpoint http://localhost:4566 as arg. Ex
aws --endpoint-url=http://localhost:4566 s3 ls s3://bucket
- Or, install awslocal
pip install awscli-local. After install you can useawslocal s3 [OPTIONS]
- To use aws need to set the endpoint http://localhost:4566 as arg. Ex
-
Nginx: have two purposes
- Gateway to access to S3 bucket (Localstack)
- After deploy the MFEs, Nginx will serve the MFEs from S3 bucket (production mode)
Move to each MFE/shell folder and run:
npm run devThis will start the development servers for each MFE and shell
- Shell (mfe-blog-shell):
- Home (mfe-blog-home):
- Comments (mfe-blog-comments):
Also need run Nginx and Localstack containers to deploy the MFEs to S3 bucket. After run the containers, from root folder run:
# Deploy shell
./mfe-blog.sh shell
# Deploy home
./mfe-blog.sh home
# Deploy comments
./mfe-blog.sh comments