Skip to content

diazlp/news-aggregator-dockerize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

News Aggregator Laravel & ReactJS

- Project Running & Installation Guide (Docker)

to run this project, please kindly clone/download the repository before proceeding further.

Note: Please ensure you have docker installed on your system.

  1. Setup .env file inside the news-aggregator-laravel-api folder, you can get all the value from env.example for your convenience.

  2. Execute the following command in your terminal:

docker-compose build --no-cache

      After finished, proceed to execute

docker-compose up

      and wait for the programs to start. (please note that this might take a while)

  1. Open another terminal, execute
docker-compose exec laravel sh

       followed by

php artisan migrate

       to migrate all the migration scripts to your mysql database on the container

  1. Open http://localhost:3000 to browse through the news-aggregator application!

PS:
If you are encountering [SQL] Connection Refused error when hitting an endpoint, make sure to follow the .env.example file or other settings on your machine.

If the issue persist, execute docker-compose ps and copy the mysql container name to and execute the followings

docker inspect <container_name>

copy the value from "IpAddress" and replace the value inside .env DB_HOST