Simple ruby application to server requests from API.ai (Dialogue Flow) for the Jarvis agent that helps me automate/control the followingstuff at home.
- DigitalOcean
- VPN server
The instructions below require the following. However, this is a simple ruby app and can be run without the below requriements.
- Docker
- Docker compose
Note: All the instructions below assume you cloned the respository and are in the project's directory.
Run the following to install the required gems:
docker-compose run app bundle install
Use the sample configuration file to set the required configuration variables in config/application.yml
.
cp config/application.yml.example config/application.yml
# Edit +application.yml+ to set the correct values to the variables
Dialogflow fullfilement server backend works only with HTTPS. The NGINX for this project it setup to serve the app via HTTPS but the certificates are to be generated and added to the project for nginx to pick it up. The files are to be placed in:
nginx/ssl/app.pem # Public certificate file.
nginx/ssl/app.privkey.pem # The private key for the certficate.
Once the above setup it done, you can run the app with
docker-compose up
This will start the web server inside the docker containers and expose it on
port 9443
of your machine. Test it with
curl https://localhost:9443
- Configuration values: These can be changed as needed in the
config/application.yml
file.