This is an example MERN boilerplate that demonstrates how to deploy a full-stack application using Porter.
Porter deploys your stack using just the single docker-compose.yml file in your local machine, allowing you to go from development to production with a single command.
This is an experimental feature of Porter that is still in active development.
- You must have Docker installed on your computer. You can download Docker here.
- Once you have Docker installed, you must be logged into Docker Hub. This is necessary to push your images into Porter's repository. To do this, run
docker loginfrom the terminal.
- Clone this repository into your local directory.
- Log in and create a project on https://dashboard.alpha.getporter.dev.
- Download the Porter CLI with
npm i -g porter-cli(currently Mac only). - Login from the CLI by running
porter login alpha.getporter.dev. - Develop your application by running
docker-compose up --buildfrom the root directory. For those who are not familiar with Docker, this will spin up a development environment with hot reloading configured for the MERN stack. You can view your application on http://localhost:3000. - Once you are ready to deploy, run
porter composefrom the root directory. This will deploy your entire stack on Porter. This may take up to 5 minutes.