Client Environment
Setup the Poocho messenger chat client
Start Docker Swarm
Navigate inside the repo with
cd poocho-messengerGet your IP with
curl ifconfig.coRun
docker swarm init --advertise-addr {SERVER_IP}Build Docker images and run Docker services;
sh build.shOpen browser;
http://xxx.xxx.xxx.xxxorhttp://yourdomain.com
Setup Environment for React Client (Dev)
Run
cd clientCreate local environment file with
sudo nano .env
REACT_APP_NATS_HOST = localhost:4222
REACT_APP_API_URL = http://localhost:5050Create production environment file with
sudo nano .env.production
REACT_APP_NATS_HOST = xxx.xxx.xxx.xxx:4222
REACT_APP_API_URL = http://xxx.xxx.xxx.xxx:5050Run
cd /root/home/poocho-messengerto return back to the root.
Setup Database
Open another terminal
Run
PG_CONTAINER_ID=$(docker ps --filter name=messages-db --format "{{.ID}}")Run
docker exec -ti $PG_CONTAINER_ID psql -U postgres -c "CREATE DATABASE underdog;
Start Docker Swarm
Run
docker swarm init --advertise-addr {SERVER_IP}Build Docker images and run Docker services;
sh build.sh

Open browser;
http://xxx.xxx.xxx.xxxorhttp://yourdomain.com
Open the web browser to
Last updated
Was this helpful?