✒️
poocho • documentation
  • Introduction
  • Basics
    • To Do
    • Logins
    • Table of Contents
  • Useful Commands
  • Environments
    • Local Environment Setup
      • macOS setup
      • Routes
    • Remote Server Setup
      • Server Setup
      • Client Environment
    • AWS Cognito Setup
    • Dockerhub
  • Server Info
    • Application
      • ** NATS
      • Dependencies
      • Main Stack
    • Server Information
      • Continuous Integration
      • Servers
        • Amazon Web Services
        • Digital Ocean
      • Code Repositories
      • Domains In Use
      • Email Settings
      • Domain Hosts & Registration
        • Domain Registrar (NameCheap)
        • DNS Host (Cloudflare)
        • Email (Gsuite)
    • External Services
      • Landbot.io
      • Flow.ai
    • Amazon Web Services (AWS)
      • AWS EC2/EBS
      • AWS Simple Email Service
      • AWS Cognito (v2)
      • AWS Cognito
      • AWS Lightsail
      • AWS Route 53
  • Code & Documentation
    • Client
    • Functions
    • Server
Powered by GitBook
On this page
  • Start Docker Swarm
  • Setup Environment for React Client (Dev)
  • Setup Database
  • Start Docker Swarm
  • Open the web browser to

Was this helpful?

  1. Environments
  2. Remote Server Setup

Client Environment

Setup the Poocho messenger chat client

Start Docker Swarm

  • Navigate inside the repo with cd poocho-messenger

  • Get your IP with curl ifconfig.co

  • Run docker swarm init --advertise-addr {SERVER_IP}

  • Build Docker images and run Docker services; sh build.sh

  • Open browser; http://xxx.xxx.xxx.xxx or http://yourdomain.com

Setup Environment for React Client (Dev)

  • Run cd client

  • Create local environment file with sudo nano .env

REACT_APP_NATS_HOST = localhost:4222
REACT_APP_API_URL = http://localhost:5050
  • Create 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:5050
  • Run cd /root/home/poocho-messenger to 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.xxx or http://yourdomain.com

Open the web browser to

Page

URL

Default route (/login)

Account Signup

PreviousServer SetupNextAWS Cognito Setup

Last updated 5 years ago

Was this helpful?

http://142.93.186.13/login
http://142.93.186.13/signup
First run of build script