Build the Docker Containers we need:
cd ./docker
docker-compose up --build -d nginx redis
Connect to Docker Container to prepare to run Bash Commands:
cd ./docker
docker-compose exec ourstatesbot bash
First, let's remove folders that may cause problems:
rm -fr node_modules
rm -fr vendor
Now we can install our dependencies:
yarn install
composer install
php artisan key:generate
Now that we have all the dependencies installed, we can build the Chat Bot.
yarn run dev
yarn run production
Now you can open your web browser to http://localhost
Internally we are using http://ourstates-bot.loc as a developer domain. This can be added to your /etc/hosts
by adding:
127.0.0.1 ourstates-bot.loc
From your local development machine, you can manage our docker containers using docker-compose
cd ./docker
command | description |
---|---|
docker-compose start |
Start Docker Services |
docker-compose logs |
View output from Docker containers |
docker-compose stop |
Stop Docker Services |
docker-compose restart |
Restart Docker Services |
docker-compose down |
Stop and remove Docker Containers, Networks, Images & Volumes |
cd ./docker
docker-compose run redis redis-cli -h redis FLUSHALL