This is a simple web chat application in go.
the application is dockerized to make everything more simple. In order to run in docker, first you need to initialize in swarm mode.
docker swarm init
Then you need to build the docker images from the root path.
The app:
docker build -t finechatapp ./finechatapp
The bot:
docker build -t finechatbot ./finechatbot
You can also download the depenencies before deploying the stack:
docker pull mariadb:10.6.4
docker pull rabbitmq:3.9.12-management
After this you can deploy the stack with the following.
docker stack deploy -c docker-compose.yml finechat
Wait for it to initialize completely, and visit http://localhost:8081.
To stop everything you can run the following command.
docker stack rm finechat
And to leave the swarm mode just type:
docker swarm leave
Process the stock commands (e.g. "/stock=googl.us"). The finechatbot is a microservice that listenes to the stock.command
topic and sends back the response or error.
This project uses mariadb as the database engine. The docker-compose.yml
file loads the finechatapp/finechat_schema.sql
script to initialize the database schema and creates the appuser which is used by the api to connect.
- Chrome
- Firefox
- Edge
This repo contains two applications, the app and the bot. Each one is located on its own folder finechatapp
and finechatbot
. The reason for this is that if one of the containers crashes the other wont be affected.
- The finechatapp is responsable of the web application, users, messages and chatrooms.
- The finechatbot is responsable to process any stock command message.
The frontend app is written in Vuejs and is located in finechatapp/internal/web
which combined with golang embed files, makes working with SPAs really easy.