macOS setup

Instructions

  • Install Docker and make sure it is up to date.

  • Clone the repo with git clone https://github.com/yalefox/poocho-messenger

  • Open terminal and navigate to the root of the repo.

  • Make sure Docker is open.

  • Run docker swarm init (Note: this only needs to be run the first time

Swarm initialized: current node (kfgchus63c3b6ew9nyrx93gya) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-41k14i127ao4m6ncj6mmu5bq4w3mqvirdl8igb417wn4v5wlez-5q0rfq8bc7qh6gdjmr654fiw1 192.168.65.3:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

Most applications using docker are in a single container. Poocho messenger has a number of different containers that need to be running at the same time. The swarm is always running, if you need to get rid of it, run docker swarm leave --force

  • Run cd client to navigate to /client directory.

  • Create a local environment file with sudo nano .env

  • Paste the following, save and exit.

REACT_APP_NATS_HOST = localhost:4222
REACT_APP_API_URL = http://localhost:5050
REACT_APP_AWS_REGION=us-east-1
REACT_APP_AWS_POOL_ID=us-east-1_Qccxby2tn
REACT_APP_AWS_CLIENT_ID=5foo8qktllsqfd8c91kh7bq8i6
REACT_APP_AWS_POOL_DOMAIN=poochodemo.auth.us-east-1.amazoncognito.com
REACT_APP_AWS_POOL_CALLBACK_URL=http://localhost

Some of the variables above come from AWS Cognito.

  • Navigate to the root folder of the project.

  • Create a new local environment file with sudo nano .env

Start Local Environment

  • Build Docker Images and run services with sh build.sh

    • The first time you run this will take some time, it took 3 minutes and 45 seconds on my local.

First run of build script

Setup Local Database

  • Open a new terminal window and run:

Start local

  • Open your browser to http://localhost and you should see the following page.

Last updated

Was this helpful?