- Docker
- Clone this repo
- Go to fast-shopping
- Run
docker-compose up --build
- Run
docker-compose exec db bash
in a new terminal - Run
mysql -h localhost -u root -p
and type the root password thatdocker-compose
contains - choose one of the scripts inside the db directory and run it by typing
source ../app/scripts/the-selected-script
in mysql console - you can exit the
db
container but do not kill thecompose
Now that the db is ready, it's time to install the project's dependencies
- Run
docker-compose exec api bash
- Run
npm install
- Rou can exit the container
Repeat this steps for the
front
container and then exit thecompose
- Go to front/app/
- Create an .env file and set its values (in
front/app/
you can find an example)
REACT_APP_API_HOST=localhost
REACT_APP_API_PORT=8081
-
Comment these line in the docker-compose for both services
stdin_open: true tty: true entrypoint: bash
-
Run again
docker-compose up --build
(I promise this is the last one 😓)
Now the app is exposed at http://localhost:3000/