- by Christian Crisologo
- A fullstack application ready to deploy to CI/CD with docker + database, ReactJS UI client + ExpressJS server + unit test .
- Install and setup docker https://www.docker.com/products/docker-desktop
- Install NPM https://nodejs.org/en/download/
- Create default docker machine with
$ docker-machine create default - Run the default docker-machine
$ docker-machine start default - Fix for old osx to set the docker-machine default ip,
'$ eval "$(docker-machine env default)' - Once the docker-machine default running, run the docker-compose and deploy
$ docker-compose up -d
- Bind the ip to local client using
`$ curl $(docker-machine ip default):3000`- Do the same for the server
`$ curl $(docker-machine ip default):4000`- Check the ip being used and use it as your localhost
`$ docker-machine ip`- To run the MySQL in local, you can use your IDE SQL using the docker yml config. In case theres a local connection issue, try to use the docker msql container sql shell
`$ docker exec -it mysql1 mysql -u root -p`- To test dev frontend in local, go to
clientdirectory then install and run the app
`$ npm i && npm start`- To test dev backend in local, go to
serverdirectory then install and run the app.(NOTE! If the DB is not accessable in your local then its better to run it in docker)
`$ npm i && npm start`